OPF
SpecDefinition referenceView source

Hex Color

Hex color shorthand accepted by selected string fields.

Metadata

Definition
#/$defs/HexColor
Form
string
Source
spec/schemas/opf.schema.json

Field index

This definition uses the forms or value constraints below.

Complete definition constraints
Schema constraints
{
  "type": "string",
  "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$",
  "description": "Hex color shorthand accepted by selected string fields.",
  "examples": [
    "#fff",
    "#ffff00",
    "#0F172AFF"
  ]
}