Colors & Themes

Semantic colors and themes for light and dark mode, ensuring accessible and consistent visual experiences.

Colors convey hierarchy, communicate state, and provide visual structure. A consistent palette guides users, highlights actions, and ensures cohesive UI behavior across applications.

Copy link to headline:Themes

We include a free and Open Source theme with light and dark mode out of the box, applied automatically without manual configuration.

Light mode

Dark mode

Protected content

Additional content is available for Schwarz Group employees.

Copy link to headline:Colors

Predefined color palettes adapt automatically between light and dark mode.

Variables vs. hardcoded colors

Always use CSS or Figma variables instead of hardcoded hex values. This ensures components adapt properly when switching between light and dark modes. For details, see the variables documentation.

Copy link to headline:Brand colors

Use brand colors as functional identifiers rather than purely decorative accents.

Copy link to headline:Primary

The primary color serves as the core brand identifier across every theme.

  1. Base

    Base colors provide the core palette for custom UI styling.

  2. Text & Icons

    Apply text and icon colors exclusively to typography and icon elements.

  3. States

    Dedicated state tokens maintain consistent borders, outlines, and focus rings.


Copy link to headline:Secondary

Use secondary brand colors sparingly for predefined accents to maintain visual balance.

  1. Base

    Base colors provide the core palette for custom UI styling.

  2. Text & Icons

    Apply text and icon colors exclusively to typography and icon elements.


Copy link to headline:Neutral

Neutral colors are used for backgrounds, borders, and secondary actions, providing contrast that helps primary colors stand out.

  1. Base

    Base colors provide the core palette for custom UI styling.

  2. Text & Icons

    Apply text and icon colors exclusively to typography and icon elements.

  3. States

    Dedicated state tokens maintain consistent borders, outlines, and focus rings.


Copy link to headline:System colors

System colors convey functional status and semantic feedback. Reserved for system states, they should not be used as decorative brand colors.

Copy link to headline:Danger

Danger colors signal urgent attention, destructive actions, or critical errors.

  1. Base

    Base colors provide the core palette for custom UI styling.

  2. Text & Icons

    Apply text and icon colors exclusively to typography and icon elements.

  3. States

    Dedicated state tokens maintain consistent borders, outlines, and focus rings.


Copy link to headline:Warning

Warning colors indicate caution, non-blocking errors, or potential risks.

  1. Base

    Base colors provide the core palette for custom UI styling.

  2. Text & Icons

    Apply text and icon colors exclusively to typography and icon elements.


Copy link to headline:Success

Success colors indicate completed actions, successful operations, or healthy system status.

  1. Base

    Base colors provide the core palette for custom UI styling.

  2. Text & Icons

    Apply text and icon colors exclusively to typography and icon elements.

  3. States

    Dedicated state tokens maintain consistent borders, outlines, and focus rings.


Copy link to headline:Info

Info colors present objective information, helpful tips, and non-critical guidance.

  1. Base

    Base colors provide the core palette for custom UI styling.

  2. Text & Icons

    Apply text and icon colors exclusively to typography and icon elements.


Copy link to headline:Quantitative colors

The quantitative palette is designed specifically for charts and data visualization.

  1. Application

    Use in infographics, charts, and dashboards to distinguish between data series.

  2. Constraint

    Do not use quantitative colors for UI elements (buttons, inputs, borders). They are decoupled from brand colors to avoid semantic ambiguity.

  3. Goal

    High-contrast hues ensure clear visual distinction across complex datasets.


Copy link to headline:Backgrounds

The tinted background should be applied to the page root, while individual UI containers and components use a blank background. See the layout guide for page structure examples.

Copy link to headline:Backdrops

Backdrops are overlays rendered behind modals and dialogs. Use the OnyxModal component for automatic backdrop support.

Copy link to headline:Usage

To toggle between light and dark mode, set the color-scheme(opens in a new tab) CSS property on the root or on a specific container:

For compatibility with older tooling, Onyx also supports the .dark class, though color-scheme is preferred.

Copy link to headline:Automatic light/dark mode

To adapt automatically to system preferences, use the approaches below for Vue or Nuxt. You can also integrate OnyxColorSchemeMenuItem or OnyxColorSchemeDialog to allow manual theme switching.

  1. Install VueUse

    Install the VueUse(opens in a new tab) package:

  2. Enable automatic light/dark mode

    Use the useColorMode()(opens in a new tab) composable from VueUse: