As described in Dynamic Color Scheme, DynamicScheme generation aims to generate colors that satisfy constraints on visual accessibility and visual expression and trueness of colors.
Above constraints are expressed as algebraic formulas and solved in the following steps:
MCU assigns all colors a “starting” tone value according to design spec. All colors are assigned one starting tone for the light theme and one for dark theme. For example, primary uses Tone 40 (more white) in Light theme and Tone 80 in Dark theme
In non-fidelity schemes, the tone level for each dynamic color remains fixed. In fidelity schemes, MCU can adjust the tones to achieve a preferred chroma as explained in Step 3.
MCU assigns all colors their hue and chroma values according to the scheme variant spec.
For instance, the scheme variant here sets the primary palette to use the same hue with the source color (H270), while the tertiary palette shifts the hue by 30 (H300).
After the above steps (1) and (2), each color in the scheme has the necessary HCT values to create a color. However, the resulting color may need revision because it is visually suboptimal or “impossible”, i.e. the color of the given Hue cannot reach the assigned Chroma at the assigned Tone.
To revise such colors, MCU can adjust their tones using one of two possible “fidelity” behaviors.
While adjusting colors' tones, MCU follows global constraints to ensure visual hierarchy and quality. Where fidelity tone adjustments and global tone constraints conflict, global tone constraints take priority.
Finally, MCU adjusts tones to meet contrast requirements by assessing the contrast ratios between colors and their assigned backgrounds. In color/background pairings where the target contrast ratio is not met, MCU adjusts the tone of the foreground color to reach the target ratio, according to the contrast level that is set.
Note that contrast ratios may not always reach the targets. For example, if a background color is a mid-tone T50, its highest contrast on-color (white) only reaches a contrast ratio of ~4.5:1. However, the targets will ensure that GAR/WCAAG minimum requirements are met.