TinyColorExtension extension

Extends the Color class to allow direct TinyColor manipulation natively

on

Properties

brightness double
Returns the perceived brightness of a color, from 0-255, as defined by Web Content Accessibility Guidelines (Version 1.0).Returns the perceived brightness of a color, from 0-255, as defined by Web Content Accessibility Guidelines (Version 1.0).
no setter
isDark bool
Return a boolean indicating whether the color's perceived brightness is dark.
no setter
isLight bool
Return a boolean indicating whether the color's perceived brightness is light.
no setter
luminance double
Return the perceived luminance of a color, a shorthand for flutter Color.computeLuminance
no setter

Methods

brighten([int amount = 10]) Color
Brighten the color a given amount, from 0 to 100.
complement() Color
Returns the complementary color for dynamic matching
darken([int amount = 10]) Color
Darken the color a given amount, from 0 to 100. Providing 100 will always return black.
desaturate([int amount = 10]) Color
Desaturate the color a given amount, from 0 to 100. Providing 100 will is the same as calling greyscale.
greyscale() Color
Completely desaturates a color into greyscale. Same as calling desaturate(100).
lighten([int amount = 10]) Color
Lighten the color a given amount, from 0 to 100. Providing 100 will always return white.
mix(Color toColor, [int amount = 50]) Color
Blends the color with another color a given amount, from 0 - 100, default 50.
saturate([int amount = 10]) Color
Saturate the color a given amount, from 0 to 100.
shade([int amount = 10]) Color
Mix the color with pure black, from 0 to 100. Providing 0 will do nothing, providing 100 will always return black.
spin([double amount = 0]) Color
Spin the hue a given amount, from -360 to 360. Calling with 0, 360, or -360 will do nothing (since it sets the hue back to what it was before).
tint([int amount = 10]) Color
Mix the color with pure white, from 0 to 100. Providing 0 will do nothing, providing 100 will always return white.
toHex8() String
toHSLColor() HSLColor
toHSVColor() HSVColor
toTinyColor() TinyColor
Converts standard Color to TinyColor object