utils/utils library

Functions

ansiColorizer({required Color color, required String message, AnsiPen? ansiPen}) String
Creates an ansi-compatable colored message from the color provided.
assertFactor(int factor) → void
Assert that the factor value is somewhere from 0 - 100. Will throw InvalidValueRangeException if not in range.
assertValue(int value) → void
Assert that the color value is somewhere from 0 - 255. Will throw InvalidValueRangeException if not in range.
colorShade(Color color, int i) Color
Shades a single Color and returns the new shaded value.
colorTint(Color color, int i) Color
Tints a single Color and returns the new tinted value.
createTintsAndShades(Iterable<ConfigColor> colors) Map<ConfigColor, List<Color>>
Generate all the shades and tints for the given colors
yamlDoc(String path, [File? file]) → YamlMap
Retrieve Yaml document with given path.

Exceptions / Errors

InvalidValueRangeException
Exception for invalid integer ranges.