CAM02 UCS
The CAM02 UCS color space is not registered in Color
by default
Properties
Name: cam02-ucs
White Point: D65 / 2˚
Coordinates:
Name | Range* |
---|---|
j | [0, 100] |
a | [-50, 50] |
b | [-50, 50] |
* Space is not bound to the range and is only used as a reference to define percentage inputs/outputs in relation to the Display P3 color space.
Figure 1. The sRGB gamut represented within the CAM02 UCS color space.
The CAM02 UCS space takes the CAM02 model and applies an additional nonlinear transformation to lightness and colorfulness so that a color difference metric ΔE can be based more closely on Euclidean distance. The cam02-ucd
color space in ColorAide is based off CAM02 (Jab) which uses M (colorfulness) to derive the a and b values. There are also SCD and LCD variants which optimize the spaces for "small" and "large" color distancing respectively.
Viewing Conditions
CAM02 UCS uses the same environment setup for viewing conditions as CAM02 JMh, so check out the related documentation if creating a CAM02 UCS variant is desired.
Channel Aliases
Channels | Aliases |
---|---|
j | lightness |
a | |
b |
Input/Output
The CAM02 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 --cam02-ucs
:
color(--cam02-ucs j a b / a) // Color function
The string representation of the color object and the default string output use the color(--cam02-ucs j a b / a)
form.
>>> Color("cam02-ucs", [60.054, 38.679, 24.316], 1)
color(--cam02-ucs 60.054 38.679 24.316 / 1)
>>> Color("cam02-ucs", [79.041, 9.9159, 31.18], 1).to_string()
'color(--cam02-ucs 79.041 9.9159 31.18)'
Registering
from coloraide import Color as Base
from coloraide.spaces.cam02_ucs import CAM02UCS
class Color(Base): ...
Color.register(CAM02UCS())