View source

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

Available on all platforms

CIELUV is a color space adopted by the International Commission on Illumination (CIE) in 1976, as a simple-to-compute transformation of the 1931 CIE XYZ color space, but which attempted perceptual uniformity.

It is extensively used for applications such as computer graphics which deal with colored lights. Although additive mixtures of different colored lights will fall on a line in CIELUV's uniform chromaticity diagram (dubbed the CIE 1976 UCS), such additive mixtures will not, contrary to popular belief, fall along a line in the CIELUV color space unless the mixtures are constant in lightness.

Class Fields

inline function create(l:Float, u:Float, v:Float):Luv

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

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

Instance Fields

var l(get,null):Float

var u(get,null):Float

var v(get,null):Float

function equals(other:Luv):Bool

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

function max(other:Luv):Luv

function min(other:Luv):Luv

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

function normalize():Luv

function roundTo(decimals:Int):Luv

function toCmy():Cmy

function toCmyk():Cmyk

function toGrey():Grey

function toHsl():Hsl

function toHsv():Hsv

function toLCh():LCh

function toLab():Lab

function toRgb():Rgb

function toRgba():Rgba

function toRgbx():Rgbx

function toRgbxa():Rgbxa

function toString():String

function toXyz():Xyz

function toYxy():Yxy

function withU(newu:Float):Luv

function withV(newv:Float):Luv

function withY(newy:Float):Luv