kandinsky_dart library

Functions

color2hue(num colorValue, num shading, num tint) num
returns a color saturation
complimentHex(num n, String hex) List<String>
returns an length n array of hex strings. The 0th color is the same as the input hexString, while the others are colours corresponding to an eve turn around the colour wheel. If n is 3 for example, the two other colours would represent a 1/3 and 2/3 rotation of the colour wheel.
complimentHsl(num n, List<num> color) List<List<num>>
returns an length n array of hsl Vector3. The 0th color is the same as the input hsl, while the others are colours corresponding to an eve turn around the colour wheel. If n is 3 for example, the two other colours would represent a 1/3 and 2/3 rotation of the colour wheel.
complimentRgb(num n, List<num> color) List<List<num>>
returns an length n array of rgb Vector3. The 0th color is the same as the input rgb, while the others are colours corresponding to an eve turn around the colour wheel. If n is 3 for example, the two other colours would represent a 1/3 and 2/3 rotation of the colour wheel.
darkenHex(num amount, String hex) String
returns a darkened hex string. amount is a value in the range [0, 1]
darkenHsl(num amount, List<num> color) List<num>
returns a darkened hsl array. amount is a value in the range [0, 1]
darkenRgb(num amount, List<num> rgb) List<num>
returns a darkened rgb array. amount is a value in the range [0, 1]
gradient(Function ease, int n, List<num> color1, List<num> color2) List<List<num>>
returns an length n array of Vector3 colours. colours are between color1 and color2, and are spaced according to the easing function easeFn.
hex2hsl(String hex) List<num>
returns a hex string
hex2rgb(String hex) List<num>
returns a rgb array
hsl2css(num alpha, List<num> hsl) String
returns an hsl css string like hsl(222, 50%, 75%, 0.6) from the hsl color and alpha value
hsl2hex(List<num> color) String
returns a hex string
hsl2rgb(List<num> color) List<num>
returns a rgb array
lerp3(num t, List<num> color1, List<num> color2) List<num>
returns a Vector3 colour somewhere between c1 and c2. t is the "time" value in the range [0, 1]
lightenHex(num amount, String hex) String
returns a lightened hex string. amount is a value in the range [0, 1]
lightenHsl(num amount, List<num> color) List<num>
returns a lightened hsl array. amount is a value in the range [0, 1]
lightenRgb(num amount, List<num> rgb) List<num>
returns a lightened rgb array. amount is a value in the range [0, 1]
linearGradient(num n, List<num> color1, List<num> color2) List<List<num>>
returns an length n array of Vector3 colours. colours are evenly spaced between color1 and color2.
multiGradient(num n, List<List<num>> colors) List<List<num>>
returns a length n array of Vector3 colours. colours are the ones formed from the linearGradient(n/(numColours-1), color1, color2) for all colours color1, color2, ..., colorN
rgb2css(num alpha, List<num> color) String
returns an rgba css string like rgba(255, 255, 255, 1) from the rgb color and alpha value
rgb2hex(List<num> rgb) String
returns a hex string
rgb2hsl(List<num> color) List<num>
returns a hsl array
rGradient(Function ease, num n, List<num> color1, List<num> color2) List<List<num>>
returns a rounded, length n array of Vector3 colours. colours are between color1 and color2, and are spaced according to the easing function easeFn.
rLinearGradient(num n, List<num> color1, List<num> color2) List<List<num>>
returns a rounded, length n array of Vector3 colours. colours are evenly spaced between color1 and color2.
rMultiGradient(num n, List<List<num>> colors) List<List<num>>
returns a rounded, length n array of Vector3 colours. colours are the ones formed from the linearGradient(n/(numColours-1), color1, color2) for all colours color1, color2, ..., colorN