TinyColorExtension extension

Extends the Color class to allow direct TinyColor manipulation nativly

on

Properties

brightness double
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.
mix({required Color input, int amount = 50}) Color
Blends the color with another color a given amount, from 0 - 100, default 50.
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.
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.
toHsl() HslColor