View source

abstract thx.color.LCh(Array<Float>)

Available on all platforms

The CIELCh color space is a CIELab cube color space, whereby instead of Cartesian coordinates a, b, the cylindrical coordinates C (chroma, relative saturation) and h° (hue angle, angle of the hue in the CIELab color wheel) are specified. The CIELab - brightness L remains unchanged.

The CIELCh color space is not the same as the HSV, HSL or HSB color spaces. Although their values can also be interpreted as a base color, brightness and saturation of a color tone, and are polar coordinate transformation of what is technically defined RGB cube color space, CIELCh is still perceptually uniform.

For example, H and h are not identical, because HSL space use as primary colors, the three additive primary colors red, green, blue (H = 0, 120, 240°), instead the CIELCh system use four physiological elementary colors yellow, green, blue and red (h = 90, 180, 270, 360°). h = 0 mean the achromatic colors to the gray axis.

There are simplified spellings LCh, LCH and HLC common.

Class Fields

inline function create(lightness:Float, chroma:Float, hue:Float):LCh

function fromFloats(arr:Array<Float>):LCh

function fromString(color:String):Null<LCh>

Instance Fields

var chroma(get,null):Float

var hue(get,null):Float

var lightness(get,null):Float

function analogous(spread:Float = 30.0):Tuple2<LCh, LCh>

function complement():LCh

function equals(other:LCh):Bool

function interpolate(other:LCh, t:Float):LCh

function interpolateWidest(other:LCh, t:Float):LCh

function max(other:LCh):LCh

function min(other:LCh):LCh

function nearEquals(other:LCh, tolerance:Float = Floats.EPSILON):Bool

function normalize():LCh

function rotate(angle:Float):LCh

function roundTo(decimals:Int):LCh

function split(spread:Float = 144.0):Tuple2<LCh, LCh>

function square():Tuple4<LCh, LCh, LCh, LCh>

function tetrad(angle:Float):Tuple4<LCh, LCh, LCh, LCh>

function toCmy():Cmy

function toCmyk():Cmyk

function toGrey():Grey

function toHclString():String

function toHsl():Hsl

function toHsv():Hsv

function toLab():Lab

function toLuv():Luv

function toRgb():Rgb

function toRgba():Rgba

function toRgbx():Rgbx

function toRgbxa():Rgbxa

function toString():String

function toXyz():Xyz

function toYuv():Yuv

function toYxy():Yxy

function triad():Tuple3<LCh, LCh, LCh>

function withChroma(newchroma:Float):LCh

function withHue(newhue:Float):LCh

function withLightness(newlightness:Float):LCh