Color system
As an example, this section examines the color token system operating on this web resource. It is built upon a strictly structured nomenclature of color designations:
- Base color token structure:
color-{type}-{category}-{variant}-({state}) - Surface color token structure:
color-on-{category}-{variant}-{state}-{onType}-({onState})
This approach ensures high speed of verification and selection of the required color. The clear coding structure allows for instant determination of the functional purpose of a specific color by its name, which significantly improves source code readability in the context of styling. It also allows the digital product's color system to scale easily as it grows.
The use of a specialized on- prefix establishes a strict dependency between the color of an overlaid element and the color of the underlying surface (the identifier of which follows next). This color binding minimizes the likelihood of erroneously applying incompatible or incorrect colors during interface design.
The generation of derived (helper) color tokens is carried out automatically via the SCSS preprocessor. The algorithm for calculating derivative shades is based on the values of anchor colors (bg-…-primary) and is determined relative to the color parameters of the background space and main text content.
Base
Fundamental interface colors that determine the main background and base typography.
bg-basebg-base-hoverbg-base-activetext-base-primaryThe quick brown fox jumps over the lazy dog
border-basetext-base-secondaryThe quick brown fox jumps over the lazy dog
text-base-tertiaryThe quick brown fox jumps over the lazy dog
Brand
Brand colors used for core interface elements.
bg-brand-primaryon-brand-primary-textThe quick brown fox jumps over the lazy dog
on-brand-primary-text-lowThe quick brown fox jumps over the lazy dog
text-brand-primaryThe quick brown fox jumps over the lazy dog
border-brand-primarybg-brand-secondaryon-brand-secondary-textThe quick brown fox jumps over the lazy dog
on-brand-secondary-text-lowThe quick brown fox jumps over the lazy dog
text-brand-secondaryThe quick brown fox jumps over the lazy dog
border-brand-secondary
Nav
Colors for navigation elements that help the user orient within the application structure.
bg-navon-nav-textThe quick brown fox jumps over the lazy dog
on-nav-text-lowThe quick brown fox jumps over the lazy dog
on-nav-border
bg-nav-hoverbg-nav-activeborder-nav
Accent
Vibrant colors to draw attention to interactive elements and calls to action.
bg-accent-primaryon-accent-primary-bgon-accent-primary-bg-activeon-accent-primary-bg-hoveron-accent-primary-textThe quick brown fox jumps over the lazy dog
on-accent-primary-text-lowThe quick brown fox jumps over the lazy dog
on-accent-primary-border
bg-accent-primary-hoverbg-accent-primary-activetext-accent-primaryThe quick brown fox jumps over the lazy dog
text-accent-primary-hoverThe quick brown fox jumps over the lazy dog
text-accent-primary-activeThe quick brown fox jumps over the lazy dog
border-accent-primarybg-accent-secondaryon-accent-secondary-bgon-accent-secondary-bg-activeon-accent-secondary-bg-hoveron-accent-secondary-textThe quick brown fox jumps over the lazy dog
on-accent-secondary-text-lowThe quick brown fox jumps over the lazy dog
on-accent-secondary-border
bg-accent-secondary-hoverbg-accent-secondary-activetext-accent-secondaryThe quick brown fox jumps over the lazy dog
text-accent-secondary-hoverThe quick brown fox jumps over the lazy dog
text-accent-secondary-activeThe quick brown fox jumps over the lazy dog
border-accent-secondarybg-accent-tertiaryon-accent-tertiary-bgon-accent-tertiary-bg-activeon-accent-tertiary-bg-hoveron-accent-tertiary-textThe quick brown fox jumps over the lazy dog
on-accent-tertiary-text-lowThe quick brown fox jumps over the lazy dog
on-accent-tertiary-border
bg-accent-tertiary-hoverbg-accent-tertiary-activetext-accent-tertiaryThe quick brown fox jumps over the lazy dog
text-accent-tertiary-hoverThe quick brown fox jumps over the lazy dog
text-accent-tertiary-activeThe quick brown fox jumps over the lazy dog
border-accent-tertiary
Surface
Background colors for surfaces and cards.
bg-surface-primaryon-surface-primary-textThe quick brown fox jumps over the lazy dog
on-surface-primary-text-lowThe quick brown fox jumps over the lazy dog
bg-surface-secondaryon-surface-secondary-textThe quick brown fox jumps over the lazy dog
on-surface-secondary-text-lowThe quick brown fox jumps over the lazy dog
bg-surface-tertiaryon-surface-tertiary-textThe quick brown fox jumps over the lazy dog
on-surface-tertiary-text-lowThe quick brown fox jumps over the lazy dog
Success
Colors used to indicate successful operations.
bg-success-primaryon-success-primary-bgon-success-primary-bg-activeon-success-primary-bg-hoveron-success-primary-textThe quick brown fox jumps over the lazy dog
on-success-primary-text-lowThe quick brown fox jumps over the lazy dog
on-success-primary-border
bg-success-primary-hoverbg-success-primary-activetext-success-primaryThe quick brown fox jumps over the lazy dog
border-success-primarybg-success-secondaryon-success-secondary-bgon-success-secondary-bg-activeon-success-secondary-bg-hoveron-success-secondary-textThe quick brown fox jumps over the lazy dog
on-success-secondary-text-lowThe quick brown fox jumps over the lazy dog
on-success-secondary-border
bg-success-secondary-hoverbg-success-secondary-activetext-success-secondaryThe quick brown fox jumps over the lazy dog
border-success-secondarybg-success-tertiaryon-success-tertiary-bgon-success-tertiary-bg-activeon-success-tertiary-bg-hoveron-success-tertiary-textThe quick brown fox jumps over the lazy dog
on-success-tertiary-text-lowThe quick brown fox jumps over the lazy dog
on-success-tertiary-border
bg-success-tertiary-hoverbg-success-tertiary-activetext-success-tertiaryThe quick brown fox jumps over the lazy dog
border-success-tertiary
Warning
Colors for warnings regarding potential errors or requiring attention.
bg-warning-primaryon-warning-primary-bgon-warning-primary-bg-activeon-warning-primary-bg-hoveron-warning-primary-textThe quick brown fox jumps over the lazy dog
on-warning-primary-text-lowThe quick brown fox jumps over the lazy dog
on-warning-primary-border
bg-warning-primary-hoverbg-warning-primary-activetext-warning-primaryThe quick brown fox jumps over the lazy dog
border-warning-primarybg-warning-secondaryon-warning-secondary-bgon-warning-secondary-bg-activeon-warning-secondary-bg-hoveron-warning-secondary-textThe quick brown fox jumps over the lazy dog
on-warning-secondary-text-lowThe quick brown fox jumps over the lazy dog
on-warning-secondary-border
bg-warning-secondary-hoverbg-warning-secondary-activetext-warning-secondaryThe quick brown fox jumps over the lazy dog
border-warning-secondarybg-warning-tertiaryon-warning-tertiary-bgon-warning-tertiary-bg-activeon-warning-tertiary-bg-hoveron-warning-tertiary-textThe quick brown fox jumps over the lazy dog
on-warning-tertiary-text-lowThe quick brown fox jumps over the lazy dog
on-warning-tertiary-border
bg-warning-tertiary-hoverbg-warning-tertiary-activetext-warning-tertiaryThe quick brown fox jumps over the lazy dog
border-warning-tertiary
Danger
Colors used to indicate errors and critical actions.
bg-danger-primaryon-danger-primary-bgon-danger-primary-bg-activeon-danger-primary-bg-hoveron-danger-primary-textThe quick brown fox jumps over the lazy dog
on-danger-primary-text-lowThe quick brown fox jumps over the lazy dog
on-danger-primary-border
bg-danger-primary-hoverbg-danger-primary-activetext-danger-primaryThe quick brown fox jumps over the lazy dog
border-danger-primarybg-danger-secondaryon-danger-secondary-bgon-danger-secondary-bg-activeon-danger-secondary-bg-hoveron-danger-secondary-textThe quick brown fox jumps over the lazy dog
on-danger-secondary-text-lowThe quick brown fox jumps over the lazy dog
on-danger-secondary-border
bg-danger-secondary-hoverbg-danger-secondary-activetext-danger-secondaryThe quick brown fox jumps over the lazy dog
border-danger-secondarybg-danger-tertiaryon-danger-tertiary-bgon-danger-tertiary-bg-activeon-danger-tertiary-bg-hoveron-danger-tertiary-textThe quick brown fox jumps over the lazy dog
on-danger-tertiary-text-lowThe quick brown fox jumps over the lazy dog
on-danger-tertiary-border
bg-danger-tertiary-hoverbg-danger-tertiary-activetext-danger-tertiaryThe quick brown fox jumps over the lazy dog
border-danger-tertiary
Highlight
Colors for emphasizing active content or important text fragments.
bg-highlight-primaryon-highlight-primary-bgon-highlight-primary-bg-activeon-highlight-primary-bg-hoveron-highlight-primary-textThe quick brown fox jumps over the lazy dog
on-highlight-primary-text-lowThe quick brown fox jumps over the lazy dog
on-highlight-primary-border
bg-highlight-primary-hoverbg-highlight-primary-activeborder-highlight-primarybg-highlight-secondaryon-highlight-secondary-bgon-highlight-secondary-bg-activeon-highlight-secondary-bg-hoveron-highlight-secondary-textThe quick brown fox jumps over the lazy dog
on-highlight-secondary-text-lowThe quick brown fox jumps over the lazy dog
on-highlight-secondary-border
bg-highlight-secondary-hoverbg-highlight-secondary-activeborder-highlight-secondarybg-highlight-tertiaryon-highlight-tertiary-bgon-highlight-tertiary-bg-activeon-highlight-tertiary-bg-hoveron-highlight-tertiary-textThe quick brown fox jumps over the lazy dog
on-highlight-tertiary-text-lowThe quick brown fox jumps over the lazy dog
on-highlight-tertiary-border
bg-highlight-tertiary-hoverbg-highlight-tertiary-activeborder-highlight-tertiary
Additional0
Additional colors used, for example, in charts and diagrams.
bg-additional0-primaryon-additional0-primary-bgon-additional0-primary-bg-activeon-additional0-primary-bg-hoveron-additional0-primary-textThe quick brown fox jumps over the lazy dog
on-additional0-primary-text-lowThe quick brown fox jumps over the lazy dog
on-additional0-primary-border
bg-additional0-primary-hoverbg-additional0-primary-activetext-additional0-primaryThe quick brown fox jumps over the lazy dog
border-additional0-primarybg-additional0-secondaryon-additional0-secondary-bgon-additional0-secondary-bg-activeon-additional0-secondary-bg-hoveron-additional0-secondary-textThe quick brown fox jumps over the lazy dog
on-additional0-secondary-text-lowThe quick brown fox jumps over the lazy dog
on-additional0-secondary-border
bg-additional0-secondary-hoverbg-additional0-secondary-activetext-additional0-secondaryThe quick brown fox jumps over the lazy dog
border-additional0-secondarybg-additional0-tertiaryon-additional0-tertiary-bgon-additional0-tertiary-bg-activeon-additional0-tertiary-bg-hoveron-additional0-tertiary-textThe quick brown fox jumps over the lazy dog
on-additional0-tertiary-text-lowThe quick brown fox jumps over the lazy dog
on-additional0-tertiary-border
bg-additional0-tertiary-hoverbg-additional0-tertiary-activetext-additional0-tertiaryThe quick brown fox jumps over the lazy dog
border-additional0-tertiary
Additional1
Additional colors used, for example, in charts and diagrams.
bg-additional1-primaryon-additional1-primary-bgon-additional1-primary-bg-activeon-additional1-primary-bg-hoveron-additional1-primary-textThe quick brown fox jumps over the lazy dog
on-additional1-primary-text-lowThe quick brown fox jumps over the lazy dog
on-additional1-primary-border
bg-additional1-primary-hoverbg-additional1-primary-activetext-additional1-primaryThe quick brown fox jumps over the lazy dog
border-additional1-primarybg-additional1-secondaryon-additional1-secondary-bgon-additional1-secondary-bg-activeon-additional1-secondary-bg-hoveron-additional1-secondary-textThe quick brown fox jumps over the lazy dog
on-additional1-secondary-text-lowThe quick brown fox jumps over the lazy dog
on-additional1-secondary-border
bg-additional1-secondary-hoverbg-additional1-secondary-activetext-additional1-secondaryThe quick brown fox jumps over the lazy dog
border-additional1-secondarybg-additional1-tertiaryon-additional1-tertiary-bgon-additional1-tertiary-bg-activeon-additional1-tertiary-bg-hoveron-additional1-tertiary-textThe quick brown fox jumps over the lazy dog
on-additional1-tertiary-text-lowThe quick brown fox jumps over the lazy dog
on-additional1-tertiary-border
bg-additional1-tertiary-hoverbg-additional1-tertiary-activetext-additional1-tertiaryThe quick brown fox jumps over the lazy dog
border-additional1-tertiary
Additional2
Additional colors used, for example, in charts and diagrams.
bg-additional2-primaryon-additional2-primary-bgon-additional2-primary-bg-activeon-additional2-primary-bg-hoveron-additional2-primary-textThe quick brown fox jumps over the lazy dog
on-additional2-primary-text-lowThe quick brown fox jumps over the lazy dog
on-additional2-primary-border
bg-additional2-primary-hoverbg-additional2-primary-activetext-additional2-primaryThe quick brown fox jumps over the lazy dog
border-additional2-primarybg-additional2-secondaryon-additional2-secondary-bgon-additional2-secondary-bg-activeon-additional2-secondary-bg-hoveron-additional2-secondary-textThe quick brown fox jumps over the lazy dog
on-additional2-secondary-text-lowThe quick brown fox jumps over the lazy dog
on-additional2-secondary-border
bg-additional2-secondary-hoverbg-additional2-secondary-activetext-additional2-secondaryThe quick brown fox jumps over the lazy dog
border-additional2-secondarybg-additional2-tertiaryon-additional2-tertiary-bgon-additional2-tertiary-bg-activeon-additional2-tertiary-bg-hoveron-additional2-tertiary-textThe quick brown fox jumps over the lazy dog
on-additional2-tertiary-text-lowThe quick brown fox jumps over the lazy dog
on-additional2-tertiary-border
bg-additional2-tertiary-hoverbg-additional2-tertiary-activetext-additional2-tertiaryThe quick brown fox jumps over the lazy dog
border-additional2-tertiary
Additional3
Additional colors used, for example, in charts and diagrams.
bg-additional3-primaryon-additional3-primary-bgon-additional3-primary-bg-activeon-additional3-primary-bg-hoveron-additional3-primary-textThe quick brown fox jumps over the lazy dog
on-additional3-primary-text-lowThe quick brown fox jumps over the lazy dog
on-additional3-primary-border
bg-additional3-primary-hoverbg-additional3-primary-activetext-additional3-primaryThe quick brown fox jumps over the lazy dog
border-additional3-primarybg-additional3-secondaryon-additional3-secondary-bgon-additional3-secondary-bg-activeon-additional3-secondary-bg-hoveron-additional3-secondary-textThe quick brown fox jumps over the lazy dog
on-additional3-secondary-text-lowThe quick brown fox jumps over the lazy dog
on-additional3-secondary-border
bg-additional3-secondary-hoverbg-additional3-secondary-activetext-additional3-secondaryThe quick brown fox jumps over the lazy dog
border-additional3-secondarybg-additional3-tertiaryon-additional3-tertiary-bgon-additional3-tertiary-bg-activeon-additional3-tertiary-bg-hoveron-additional3-tertiary-textThe quick brown fox jumps over the lazy dog
on-additional3-tertiary-text-lowThe quick brown fox jumps over the lazy dog
on-additional3-tertiary-border
bg-additional3-tertiary-hoverbg-additional3-tertiary-activetext-additional3-tertiaryThe quick brown fox jumps over the lazy dog
border-additional3-tertiary
Additional4
Additional colors used, for example, in charts and diagrams.
bg-additional4-primaryon-additional4-primary-bgon-additional4-primary-bg-activeon-additional4-primary-bg-hoveron-additional4-primary-textThe quick brown fox jumps over the lazy dog
on-additional4-primary-text-lowThe quick brown fox jumps over the lazy dog
on-additional4-primary-border
bg-additional4-primary-hoverbg-additional4-primary-activetext-additional4-primaryThe quick brown fox jumps over the lazy dog
border-additional4-primarybg-additional4-secondaryon-additional4-secondary-bgon-additional4-secondary-bg-activeon-additional4-secondary-bg-hoveron-additional4-secondary-textThe quick brown fox jumps over the lazy dog
on-additional4-secondary-text-lowThe quick brown fox jumps over the lazy dog
on-additional4-secondary-border
bg-additional4-secondary-hoverbg-additional4-secondary-activetext-additional4-secondaryThe quick brown fox jumps over the lazy dog
border-additional4-secondarybg-additional4-tertiaryon-additional4-tertiary-bgon-additional4-tertiary-bg-activeon-additional4-tertiary-bg-hoveron-additional4-tertiary-textThe quick brown fox jumps over the lazy dog
on-additional4-tertiary-text-lowThe quick brown fox jumps over the lazy dog
on-additional4-tertiary-border
bg-additional4-tertiary-hoverbg-additional4-tertiary-activetext-additional4-tertiaryThe quick brown fox jumps over the lazy dog
border-additional4-tertiary
Additional5
Additional colors used, for example, in charts and diagrams.
bg-additional5-primaryon-additional5-primary-bgon-additional5-primary-bg-activeon-additional5-primary-bg-hoveron-additional5-primary-textThe quick brown fox jumps over the lazy dog
on-additional5-primary-text-lowThe quick brown fox jumps over the lazy dog
on-additional5-primary-border
bg-additional5-primary-hoverbg-additional5-primary-activetext-additional5-primaryThe quick brown fox jumps over the lazy dog
border-additional5-primarybg-additional5-secondaryon-additional5-secondary-bgon-additional5-secondary-bg-activeon-additional5-secondary-bg-hoveron-additional5-secondary-textThe quick brown fox jumps over the lazy dog
on-additional5-secondary-text-lowThe quick brown fox jumps over the lazy dog
on-additional5-secondary-border
bg-additional5-secondary-hoverbg-additional5-secondary-activetext-additional5-secondaryThe quick brown fox jumps over the lazy dog
border-additional5-secondarybg-additional5-tertiaryon-additional5-tertiary-bgon-additional5-tertiary-bg-activeon-additional5-tertiary-bg-hoveron-additional5-tertiary-textThe quick brown fox jumps over the lazy dog
on-additional5-tertiary-text-lowThe quick brown fox jumps over the lazy dog
on-additional5-tertiary-border
bg-additional5-tertiary-hoverbg-additional5-tertiary-activetext-additional5-tertiaryThe quick brown fox jumps over the lazy dog
border-additional5-tertiary
Form
Data input element colors that define field states during interaction.
bg-formon-form-textThe quick brown fox jumps over the lazy dog
on-form-text-lowThe quick brown fox jumps over the lazy dog
bg-form-disabledon-form-disabled-textThe quick brown fox jumps over the lazy dog
on-form-disabled-text-lowThe quick brown fox jumps over the lazy dog
bg-form-readonlyon-form-readonly-textThe quick brown fox jumps over the lazy dog
on-form-readonly-text-lowThe quick brown fox jumps over the lazy dog
bg-form-hoverbg-form-activebg-form-focusbg-form-autofillborder-formborder-form-disabledborder-form-readonlyborder-form-hoverborder-form-activeborder-form-focusborder-form-autofill
Backdrop
The color of the overlay layer that temporarily dims and covers the main content.
bg-backdropon-backdrop-textThe quick brown fox jumps over the lazy dog
on-backdrop-text-lowThe quick brown fox jumps over the lazy dog
on-backdrop-border
Invert
Colors for inverting block backgrounds or content under high-contrast display conditions.
bg-inverton-invert-bgon-invert-bg-activeon-invert-bg-hoveron-invert-textThe quick brown fox jumps over the lazy dog
on-invert-text-lowThe quick brown fox jumps over the lazy dog
on-invert-border
bg-invert-hoverbg-invert-active