CIE 1960 UCS
New 2.4
The CIE 1960 UCS color space is not registered in Color
by default
Properties
Name: ucs
White Point: D65 / 2˚
Coordinates:
Name | Range* |
---|---|
u | [0.0, 1.0] |
v | [0.0, 1.0] |
w | [0.0, 1.0] |
* Space is not bound to the range and is used to define percentage inputs/outputs.
The CIE 1960 color space ("CIE 1960 UCS", variously expanded Uniform Color Space, Uniform Color Scale, Uniform Chromaticity Scale, Uniform Chromaticity Space) is another name for the (u, v) chromaticity space devised by David MacAdam. The color space is implemented using the relation between this space and the XYZ space as coordinates U, V, and W.
Channel Aliases
Channels | Aliases |
---|---|
u | |
v | |
w |
Input/Output
The UCS space is not currently supported in the CSS spec, the parsed input and string output formats use the color()
function format using the custom name --ucs
:
color(--ucs u v w / a) // Color function
The string representation of the color object and the default string output use the color(--ucs u v w / a)
form.
>>> Color("ucs", [0.27493, 0.21264, 0.12243])
color(--ucs 0.27493 0.21264 0.12243 / 1)
>>> Color("ucs", [0.36462, 0.48173, 0.48122]).to_string()
'color(--ucs 0.36462 0.48173 0.48122)'
Registering
from coloraide import Color as Base
from coloraide.spaces.ucs import UCS
class Color(Base): ...
Color.register(UCS())