A simple library for manipulating colors in Dart.
- RgbColor
- HslColor
- HsvColor
final hotPink = new RgbColor(255.0, 105.0, 180.0);
// find the complementary color then convert back to RGB
final complimentary = (hotPink.toHsl()..hue -= 180).toRgb();
// Create from Hex
final seaFoamGreen = new RgbColor.fromHex('#71EEB8');
final hsl = hotPink.toHsl();
final hsv = hotPink.toHsv();
print ("The CSS string for hot pink is ${hotPink.toCss()}");
print ("The Hex string for hot pink is ${hotPink.toHex()}");
// Addition
final red = new RgbColor(255.0, 0.0, 0.0);
final blue = new RgbColor(0.0, 0.0, 255.0);
final magenta = red + blue;
// Subtraction
final green = new RgbColor(0.0, 255.0, 0.0);
final white = magenta + green;
final yellow = white - blue;