Skip to content

Color request

A Color request is a JSON value that references a specific color. The Color Request JSON schema defines its structure.

It supports three forms.

As a string:

"#aaBb22"

As a JSON object containing the color:

{
  "hex": "#aaBB22"
}

As a JSON object containing a color ID from the theme:

{
  "id": "color_id_from_theme"
}

String form

If the string begins with #, it is interpreted as a hexadecimal color. Otherwise, it is interpreted as a color ID from the theme.

Hexadecimal format

The hexadecimal value supports two forms:

  • #AABBCC: full form.
  • #ABC: shorthand form.

Info

Alpha values are not supported. The color is always fully opaque.

Hexadecimal digits are case-insensitive and can use mixed case. For example, #aBcDeF is valid.