General Concepts
Color themes and device color modes aren't synonymous; themes are tailored to apps, while modes are system-wide settings that impact device theming.
Color
Used generically to refer to named colors (e.g., blue).
Tint
A lighter value of a color.
Shade
A darker value of a color.
Tone
A less saturated version of a color. Alternatively used as a synonym for tints or shades.
Contrast Ratio
The measurable difference in lightness between two comparative using the WCAG relative luminance formula.
Target contrast ratio
The desired contrast ratio between two color values when one of the color values is generated by a color tool. For accessibility, large text should have at least a 3:1 ratio for AA compliance, and small text should have at least 4.5:1 for AA and 7:1 for AAA compliance. WPDS strives to maintain AAA (contrast ratio of 7:1). See WCAG for details.
Semantic Structure
The following is the semantic structure of our theme tokens.
Color modes
It's important to differentiate between color themes and device color modes. Color themes reflect specific design preferences, whereas device color modes are part of the operating system settings that influence the entire device's appearance. Typically, devices offer two modes: light mode and dark mode.
Theme Tokens
The theme palette is an abstraction that assigns color across the product with intention, creating an alias for color use. In our design framework, "on" colors are used on top of primary, secondary, surface, background, or error colors. For example, "on primary" is a color used over a primary color. These colors are mainly for text, icons, and strokes, though they can be used on surfaces as well.
Surfaces
The relationship between surface, elevation and shadow. Surface, background, and portal colors typically don't represent brand: Surface and portal colors affect surfaces of components, such as cards, and menus, but will change in dark mode to create elevation & hierarchy. The background color appears behind scrollable content. The baseline background, surface, and portal color is gray700.