UI Colors¶
Note: The documented colors are part of the Siemens branding and cannot be used for none Siemens applications. The color definitions are not part of the OSS package. Element comes with a default theme that is not part of the Siemens branding. The default theme is not documented.
Colors are a foundational aspect of any user interface. Maintaining consistent and engaging UIs requires specific color usage guidelines. To address this challenge, our system uses a combination of semantic naming and a layer of abstraction in both our designs and code.
Application of the color palette brings a unified and consistent experience to our products and interfaces. The theme includes a variety of solid colors and gradients to ensure that a consistent look is carried through any application. For example, action, base, and status colors are all strategically used to communicate different actions and content throughout the experience.
Element supports two modes: light
and dark
. Color variables use the same semantic naming in both modes.
For a detailed explanation on how dark mode is implemented and how to implement dark mode for applications and custom components, see here.
Tokens¶
Color tokens describe the semantic usage of primitives in a given context. More specifically, semantic colors act as an intermediary level of specificity, between the raw value of colors in the base palette and the usage of those colors in specific components. There can be various levels of semantic hierarchies, although we should strive to keep these as simple as possible.
Naming colors semantically has two benefits:
- It helps designers and developers decide what color to use.
- It makes our color system more efficient and flexible.
The following categories are defined in our system:
UI¶
UI colors are used on structural properties and icons and provide good contrast when used over any background.
Value light | Value dark | Token | Use | Associated color - light | Associated color - dark |
---|---|---|---|---|---|
$element-ui-0 | Logo, selected (active) elements | $siemens-interactive-blue-500 | $siemens-interactive-coral | ||
$element-ui-0-hover | Selected/active (ui-0) + hover | $siemens-teal | $siemens-bold-green | ||
$element-ui-1 | Primary icons | $siemens-deep-blue-900 | $siemens-white | ||
$element-ui-2 | Secondary icons | $siemens-deep-blue-600 | $siemens-deep-blue-400 | ||
$element-ui-3 | Disabled | $siemens-deep-blue-400 | $siemens-deep-blue-600 | ||
$element-ui-4 | Borders | $siemens-deep-blue-100 | $siemens-deep-blue-700 | ||
$element-ui-5 | Inverse | $siemens-white | $siemens-deep-blue-800 | ||
$element-ui-6 | Shadows | $siemens-black | $siemens-black |
Base¶
Base colors are used as backgrounds of containers.
Value light | Value dark | Token | Use | Associated color - light | Associated color - dark |
---|---|---|---|---|---|
$element-base-0 | Page background | $siemens-light-sand | $siemens-deep-blue-900 | ||
$element-base-1 | Header, navigation, card, table, tree, menu background | $siemens-white | $siemens-deep-blue-800 | ||
$element-base-1-hover | Hover on base-1 backgrounds, like table, tree, or menu | $siemens-light-sand | $siemens-dark-grayish-navy | ||
$element-base-1-selected | Selected on base-1 backgrounds, like table, tree, or menu | $siemens-sand | $siemens-grayish-navy | ||
$element-base-2 | Page background with higher contrast pages in dark mode | $siemens-white | $siemens-deep-blue-900 | ||
$element-base-3 | Background that works on base-0 and base-1 with elevation | $siemens-white | $siemens-grayish-navy | ||
$element-base-information | Informational component background for e.g. badges | $siemens-blue-100 | $siemens-blue-900 | ||
$element-base-success | Success component background for e.g. badges | $siemens-green-100 | $siemens-green-900 | ||
$element-base-caution | Caution component background for e.g. badges | $siemens-yellow-100 | $siemens-yellow-900 | ||
$element-base-warning | Warning component background for e.g. badges | $siemens-orange-100 | $siemens-orange-900 | ||
$element-base-danger | Danger component background for e.g. badges | $siemens-red-100 | $siemens-red-900 | ||
$element-base-critical | Critical component background for e.g. status | $siemens-red-100 | $siemens-red-900 | ||
$element-base-translucent-1 | Translucent, e.g. backdrop | rgba($siemens-black, 0.3) | rgba($siemens-black, 0.7) | ||
$element-base-translucent-2 | Slightly translucent background, e.g. toasts | rgba($siemens-deep-blue, 0.88) | rgba($siemens-white, 0.88) |
Actions¶
Action colors are used to indicate actions that users can perform.
Value light | Value dark | Token | Use | Associated color - light | Associated color - dark |
---|---|---|---|---|---|
$element-action-primary | Primary interaction | $siemens-interactive-blue-500 | $siemens-interactive-coral | ||
$element-action-primary-hover | Primary action on hover | $siemens-teal | $siemens-bold-green | ||
$element-action-primary-text | Primary text color | $siemens-white | $siemens-deep-blue-900 | ||
$element-action-secondary | Secondary interaction | transparent | transparent | ||
$element-action-secondary-hover | Secondary interaction on hover | $siemens-light-bold-green | $siemens-dark-bold-green | ||
$element-action-secondary-text | Secondary text color | $siemens-interactive-blue-500 | $siemens-interactive-coral | ||
$element-action-secondary-text-hover | Secondary text hover color | $siemens-teal | $siemens-bold-green | ||
$element-action-secondary-border | Secondary border color | $siemens-interactive-blue-500 | $siemens-interactive-coral | ||
$element-action-secondary-border-hover | Secondary border hover color | $siemens-teal | $siemens-bold-green | ||
$element-action-secondary-warning | Secondary warning text/border | $siemens-orange-900 | $siemens-orange-500 | ||
$element-action-secondary-danger | Secondary danger text/border | $siemens-red-500 | $siemens-red-300 | ||
$element-action-warning | Warning | $siemens-orange-700 | $siemens-orange-500 | ||
$element-action-warning-hover | Warning action on hover | $siemens-orange-900 | $siemens-orange-700 | ||
$element-action-warning-text | Warning text color | $siemens-white | $siemens-deep-blue-900 | ||
$element-action-danger | Danger | $siemens-red-500 | $siemens-red-500 | ||
$element-action-danger-hover | Danger action on hover | $siemens-red-700 | $siemens-red-700 | ||
$element-action-danger-text | Danger text color | $siemens-white | $siemens-white | ||
$element-focus-default | Default focus shadow color | $siemens-focus | $siemens-focus |
Text¶
Similarly, categories for typography colors are also defined in this system.
Value light | Value dark | Token | Use | Associated color - light | Associated color - dark |
---|---|---|---|---|---|
$element-text-primary | Primary | $siemens-deep-blue-900 | $siemens-white | ||
$element-text-secondary | Secondary | $siemens-deep-blue-700 | $siemens-deep-blue-300 | ||
$element-text-disabled | Disabled | $siemens-deep-blue-500 | $siemens-deep-blue-600 | ||
$element-text-inverse | Inverse | $siemens-white | $siemens-deep-blue-900 | ||
$element-text-active | Active | $siemens-interactive-blue-500 | $siemens-interactive-coral | ||
$element-text-information | Informational | $siemens-blue-700 | $siemens-blue-100 | ||
$element-text-success | Success | $siemens-green-700 | $siemens-green-100 | ||
$element-text-caution | Caution | $siemens-yellow-900 | $siemens-yellow-100 | ||
$element-text-warning | Warning | $siemens-orange-900 | $siemens-orange-100 | ||
$element-text-danger | Danger | $siemens-red-700 | $siemens-red-100 |
Status¶
Status colors are used to describe and/or report on the status of different things.
Value light | Value dark | Token | Use | Associated color - light | Associated color - dark |
---|---|---|---|---|---|
$element-status-information | Informational | $siemens-blue-500 | $siemens-blue-500 | ||
$element-status-information-contrast | Information contrast for e.g. composite icons | $siemens-white | $siemens-white | ||
$element-status-success | Success | $siemens-green-700 | $siemens-green-500 | ||
$element-status-success-contrast | Success contrast for e.g. composite icons | $siemens-white | $siemens-deep-blue-900 | ||
$element-status-caution | Caution | $siemens-yellow-500 | $siemens-yellow-300 | ||
$element-status-caution-contrast | Caution contrast for e.g. composite icons | $siemens-deep-blue-900 | $siemens-deep-blue-900 | ||
$element-status-warning | Warning | $siemens-orange-700 | $siemens-orange-500 | ||
$element-status-warning-contrast | Warning contrast for e.g. composite icons | $siemens-white | $siemens-deep-blue-900 | ||
$element-status-danger | Danger | $siemens-red-500 | $siemens-red-500 | ||
$element-status-danger-contrast | Danger contrast for e.g. composite icons | $siemens-white | $siemens-white | ||
$element-status-critical | Critical | $siemens-red-900 | $siemens-red-700 | ||
$element-status-critical-contrast | Critical contrast for e.g. composite icons | $siemens-white | $siemens-white |
Code¶
Colors can be consumed within applications either by semantic color (e.g. $element-ui-0
) or design system color (e.g. $siemens-interactive-blue-500
). It is recommended to use semantic colors whenever possible to reduce the impact on an application if the color system is getting updated. Use design system colors if a design specification specifically demands it.
Contextual Colors¶
The contextual colors represent the primary colors of each specific use-case and are defined by Bootstrap. They can be consumed directly using Bootstraps color utility classes.
Element extends the Bootstrap color utils with additional classes for Element specific colors. These classes are defined in the _utilities file.
Using contextual colors within SASS stylesheets is also possible by importing the Element Theme variables.
@use '@siemens/element-theme/src/styles/variables';
background-color: variables.$element-base-0;
color: variables.$element-text-warning;
...
Except where otherwise noted, content on this site is licensed under MIT License.