More than one shape is accepted. Use exactly one of the 4 alternatives below. They are different ways to say the same kind of value.
anyOf 1stringWrite a text value.
The text must match the pattern ^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$. That pattern is the contract for which characters are allowed.
Exact constraints
- type
string- pattern
^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$
anyOf 2"transparent" | "currentColor" | "black" | "white"Pick one of the 4 listed values. Any other value is invalid. The list is closed on purpose so tools agree on the same words.
Exact constraints
"transparent""currentColor""black""white"
anyOf 3tokenRefThis is not a new shape. It reuses tokenRef from the common module. Open that definition for the fields you can write.
anyOf 4objectWrite an object. Only the fields named below are allowed. Unknown fields are rejected so a typo cannot hide inside the document.
You must include space and channels.
You may omit alpha. Leave a field out when you have nothing to say. Do not invent a placeholder.
Exact constraints
- type
object- additional properties
forbidden
spacerequired"srgb" | "srgb-linear" | "display-p3" | "rec2020" | "lab" | "lch" | "oklab" | "oklch" | "xyz-d50" | "xyz-d65"Pick one of the 10 listed values. Any other value is invalid. The list is closed on purpose so tools agree on the same words.
Exact constraints
"srgb""srgb-linear""display-p3""rec2020""lab""lch""oklab""oklch""xyz-d50""xyz-d65"
channelsrequiredarray<number>Write a list. Each item follows the shape described under items.
The list needs at least 3 items.
The list allows at most 3 items.
Exact constraints
- type
array- min items
3- max items
3
itemsnumberWrite a number. Decimals are allowed.
Exact constraints
- type
number
alphanumberWrite a number. Decimals are allowed.
The number must sit between 0 and 1, including both ends.
Exact constraints
- type
number- minimum
0- maximum
1