luxe: color
import "luxe: color" for ColorAccess to color APIs. Note that this is not done at all.
Color.white
Section titled “Color.white”Color.white : ColorA constant for [1,1,1,1]. Note: don’t modify the return value.
Color.black
Section titled “Color.black”Color.black : ColorA constant for [0,0,0,1]. Note: don’t modify the return value.
Color.clear
Section titled “Color.clear”Color.clear : ColorA constant for [0,0,0,0]. Note: don’t modify the return value.
Color.pink
Section titled “Color.pink”Color.pink : ColorThe luxe pink color used everywhere. Note: don’t modify the return value.
Color.red
Section titled “Color.red”Color.red : ColorThe luxe red color. Note: don’t modify the return value.
Color.green
Section titled “Color.green”Color.green : ColorThe luxe green color. Note: don’t modify the return value.
Color.blue
Section titled “Color.blue”Color.blue : ColorThe luxe blue color. Note: don’t modify the return value.
Color.hex(.)
Section titled “Color.hex(.)”Color.hex(value : Num) : ColorReturns a new color from the specified hex color value.
var color = Color.hex(0xFF00AA)
Color.clone(..)
Section titled “Color.clone(..)”Color.clone(other : Color, alpha : Num) : unknownReturns a new color from the specified color with a different alpha.
var other = Color.hex(0xFF00AA)var color = Color.clone(other, 0.5)
Color.hex_string(.)
Section titled “Color.hex_string(.)”Color.hex_string(color : Color) : StringReturns a hex string from the specified color.
Color.hex_string(Color.white) //#FFFFFF
Color.hex_string(..)
Section titled “Color.hex_string(..)”Color.hex_string(color : Color, alpha : Bool) : StringReturns a hex string from the specified color. If
alphais true, includes the alpha component.Color.hex_string(Color.white, true) //#FFFFFFFF
Color.hex(..)
Section titled “Color.hex(..)”Color.hex(value : Num, alpha : Num) : ColorReturns a new color from the specified hex color value, with the specified alpha value.
var color = Color.hex(0xFF00AA, 0.5)
Color.hex_set(..)
Section titled “Color.hex_set(..)”Color.hex_set(color : Color, hex : Num) : unknownSet an existing color to the specified hex color value.
var color = Color.hex_set(0xFF00AA)
Color.hex_color(.)
Section titled “Color.hex_color(.)”Color.hex_color(color : Color) : NumGet the hex color value of a color
Color.hex_color(..)
Section titled “Color.hex_color(..)”Color.hex_color(color : Color, include_alpha : Bool) : NumGet the hex color value of a color, either 3 byte or 4 byte with alpha
Color.linear_to_srgb(.)
Section titled “Color.linear_to_srgb(.)”Color.linear_to_srgb(color : Color) : ColorConvert a linear color to sRGB (2.2 gamma)
Color.srgb_to_linear(.)
Section titled “Color.srgb_to_linear(.)”Color.srgb_to_linear(color : Color) : ColorConvert an sRGB color to linear (2.2 gamma)
Color.lerp(…)
Section titled “Color.lerp(…)”Color.lerp(from : Color, to : Color, t : Num) : ColorLinearly interpolate between two colors, using
tas the distance between the two in 0…1 range. To blend two colors half and half, you’d uselerp(from, to, 0.5). Iftis0,fromis returned and iftis1,tois returned.
Color.lerp(…)
Section titled “Color.lerp(…)”Color.lerp(from : Color, to : Color, t : Num, into : Color) : unknownLinearly interpolate between two colors, storing the result in the existing color
into.tis the distance between the two in 0…1 range. To blend two colors half and half, you’d uselerp(from, to, 0.5). Iftis0,fromis returned and iftis1,tois returned.
Color.rgb2hsv(.)
Section titled “Color.rgb2hsv(.)”Color.rgb2hsv(rgb : Color) : ColorConvert from an RGB format color to an HSV format.
Color.hsv2rgb(.)
Section titled “Color.hsv2rgb(.)”Color.hsv2rgb(hsv : Color) : ColorConvert an HSV format color to an RGB format.
Color.color_from_hue(.)
Section titled “Color.color_from_hue(.)”Color.color_from_hue(hue : Num) : ColorCreate a color from the given hue, in a 0…1 range. Values outside 0…1 are wrapped into 0…1 range.
Color.linear_srgb_to_oklab(…)
Section titled “Color.linear_srgb_to_oklab(…)”Color.linear_srgb_to_oklab(r : Num, g : Num, b : Num) : unknownno docs found
Color.oklab_to_linear_srgb(…)
Section titled “Color.oklab_to_linear_srgb(…)”Color.oklab_to_linear_srgb(L : Num, a : Num, b : Num) : unknownno docs found
Color.okhsl_to_srgb(…)
Section titled “Color.okhsl_to_srgb(…)”Color.okhsl_to_srgb(h : Num, s : Num, l : Num) : unknownno docs found
Color.srgb_to_okhsl(…)
Section titled “Color.srgb_to_okhsl(…)”Color.srgb_to_okhsl(r : Num, g : Num, b : Num) : unknownno docs found
Color.okhsv_to_srgb(…)
Section titled “Color.okhsv_to_srgb(…)”Color.okhsv_to_srgb(h : Num, s : Num, v : Num) : unknownno docs found
Color.srgb_to_okhsv(…)
Section titled “Color.srgb_to_okhsv(…)”Color.srgb_to_okhsv(r : Num, g : Num, b : Num) : unknownno docs found
Color.find_cusp(..)
Section titled “Color.find_cusp(..)”Color.find_cusp(a : Any, b : Any) : unknownno docs found
Color.compute_max_saturation(..)
Section titled “Color.compute_max_saturation(..)”Color.compute_max_saturation(a : Num, b : Num) : unknownno docs found
Color.find_gamut_intersection(…)
Section titled “Color.find_gamut_intersection(…)”Color.find_gamut_intersection(a : Any, b : Any, L1 : Any, C1 : Any, L0 : Any, cusp : Any) : unknownno docs found