View source

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

Available on all platforms

YUV is a color space typically used as part of a color image pipeline. It encodes a color image or video taking human perception into account, allowing reduced bandwidth for chrominance components, thereby typically enabling transmission errors or compression artifacts to be more efficiently masked by the human perception than using a "direct" RGB-representation. Other color spaces have similar properties, and the main reason to implement or investigate properties of Y'UV would be for interfacing with analog or digital television or photographic equipment that conforms to certain Y'UV standards.

Class Fields

inline function create(y:Float, u:Float, v:Float):Yuv

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

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

Instance Fields

var u(get,null):Float

var v(get,null):Float

var y(get,null):Float

function equals(other:Yuv):Bool

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

function max(other:Yuv):Yuv

function min(other:Yuv):Yuv

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

function normalize():Yuv

function roundTo(decimals:Int):Yuv

function toCmy():Cmy

function toCmyk():Cmyk

function toGrey():Grey

function toHsl():Hsl

function toHsv():Hsv

function toLCh():LCh

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 toYxy():Yxy

function withU(newu:Float):Yuv

function withV(newv:Float):Yuv

function withY(newy:Float):Yuv