Color Tokens
Semantic tokens like bgPrimary or fgMuted automatically adapt to the active color scheme. Use these tokens when styling components so that light and dark mode work without any extra code.
Color Spectrum
The full color palette available in the default theme, organized by family (rows) and step 0–100 (columns). Hover any swatch to see its name.
Accessibility
Every designer and engineer should uphold WCAG AA 2.1 accessibility standards. Using CDS, especially for color, gets you 90% of the way there!
Key concepts to know
Text contrast (4.5:1) — Any text displayed on interfaces should follow a 4.5:1 color contrast between the text color and background.
Non-text contrast (3:1) — Any graphical objects such as icons, or any shape that provides understanding like the stroke of a text input, must meet a 3:1 color contrast between the element color and its background.