Color variants
Audience: CMS editors, integrators, and developers.
ColorVariant contains one complete color configuration. A
Theme selects it through lightColorVariant or
darkColorVariant. The same record can serve both appearances.
Record fields
CMS record identifier.
Required display name. It does not select the appearance or a surface role.
CMS owner identifier, set during creation and preserved during updates. It is not part of the public ColorVariant payload.
Surfaces and actions
CMS relation to the surfaces available in this variant. One surface with the theme-page Tag is required. Each Tag can occur only once in this relation.
Complete shared style for filled actions. A surface can select a complete override.
theme-brand, theme-panel, and custom surface keys are optional. Surface
selection uses the first available key in the component’s requested order.
If none is available, it uses this variant’s theme-page surface.
The selection runs independently for each appearance.
The CMS stores surfaces as a relationship list. The public CMS.ColorVariant
contains a map keyed by each related Tag’s exact name:
type ThemeSurfaces = {
'theme-page': ThemeSurface;
[key: string]: ThemeSurface;
};The display name of a ThemeSurface does not determine its map key.
Status colors
All six CMS fields are required strings. Supply explicit background and text colors for each status.
| CMS field | Public property | Meaning |
|---|---|---|
errorBackground | status.error.background | Error background. |
errorText | status.error.text | Text on the error background. |
successBackground | status.success.background | Success background. |
successText | status.success.text | Text on the success background. |
warningBackground | status.warning.background | Warning background. |
warningText | status.warning.text | Text on the warning background. |
These pairs are separate from ordinary surface and action colors.
Color values and constraints
Color fields use the CMS color input. Enter a valid CSS color such as
#1c69d4 or oklch(60% 0.15 250). Values are stored as strings without a
format conversion. The preview uses the browser’s CSS color support.
A variant must keep its required Page surface and shared ActionStyle. The CMS rejects duplicate surface Tags and removal of the required Page role. A ColorVariant cannot be deleted while a Theme references it.
Editors must supply suitable contrast. The application does not infer text colors from brightness or correct unsuitable pairs.