Protected_aProtected_bProtected_gProtected_rStatic ReadonlycompareThe default value to approximately compare colors,
StaticblackStaticblueStaticcyanStaticdarkStaticdarkStaticgreenStaticlightStaticlightStaticmagentaStaticmediumStaticorangeStaticredStatictransparentStaticveryStaticveryStaticwhiteStaticyellowConverts this color to a HueSaturationValue color.
Converts this instance to a LinearColor.
No colorspace conversion is performed. If a colorspace conversion is required, use toSRGB first and then SRGBColor.toLinear.
Converts this instance to a SRGBColor.
No colorspace conversion is performed. If a colorspace conversion is required, use toLinear first and then LinearColor.toSRGB.
StaticaddStaticconvertStaticconvertStaticdivideStaticisStaticisStaticlerpStaticmultiplyStaticmultiplyStaticsubtractStaticwithStaticwithStaticwith
The Color implements a a three-component color with an alpha component. The class follows the 'copy-on-write' pattern, which means that every operation such as Color.add or Color.subtract returns a copy of the color with updated values. It also implies that the values of the color cannot be directly modified.
The concept of immutability improves sharing of objects as all types in TypeScript are assigned by identity, instead of by-value (e.g. a copy) as in other programming languages like C.