Color fonts (such as COLRv0, COLRv1, and SVG-in-OpenType) allow glyphs to incorporate multi-colored gradients, embedded palettes, and chromatic layer shading. Historically, web developers were restricted to whatever fixed color scheme the font creator hardcoded inside the binary. The CSS @font-palette-values at-rule liberates chromatic typography by empowering developers to remap individual palette color slots or define brand-tailored palettes directly in CSS. Safari Web Inspector includes dedicated tools to audit color font palettes live. This guide covers inspecting @font-palette-values in Safari.
The Mechanics of CSS @font-palette-values
The @font-palette-values rule binds custom colors to a specific typeface family using the font-family descriptor. Within the rule, authors can reference an existing built-in font palette via base-palette and override specific indexed color layers using the override-colors descriptor: override-colors: 0 #hex, 1 #hex, .... Downstream elements activate the palette by declaring font-palette: --custom-palette-name;.
Authoring Custom Color Font Themes in CSS
Configure brand-aligned color font palettes for headlines and illustrative icons:
/* 1. Register custom palette matching light brand aesthetics */
@font-palette-values --BrandLightPalette {
font-family: "Nabla";
base-palette: 0;
override-colors:
0 #2563eb,
1 #60a5fa,
2 #93c5fd,
3 #dbeafe;
}
/* 2. Register neon cyber palette for dark mode */
@font-palette-values --BrandDarkPalette {
font-family: "Nabla";
base-palette: 1;
override-colors:
0 #ec4899,
1 #a855f7,
2 #6366f1,
3 #1e1b4b;
}
/* 3. Apply dynamically */
h1.hero-title {
font-family: "Nabla", system-ui, sans-serif;
font-size: 3.5rem;
font-palette: --BrandLightPalette;
}
[data-theme="dark"] h1.hero-title {
font-palette: --BrandDarkPalette;
}
Inspecting Color Font Layers in Safari Web Inspector
- Launch Safari on macOS and open your chromatic typography page.
- Right-click the colored headline and select Inspect Element.
- In Web Inspector, open the Elements tab and locate the Styles panel.
- Scroll to the
@font-palette-valuesat-rule displayed in the stylesheet declarations. - Click the color swatches beside individual
override-colorsindices to launch the visual color picker. - Modify layer colors live. Safari’s WebKit rendering engine updates the multi-tone font rasterization on the page in real time without refreshing.
Verifying Wide-Gamut Palette Interpolation
Safari’s implementation of @font-palette-values supports wide-gamut Display P3 colors within override-colors. Inspect the Computed tab to confirm that wide-gamut values (e.g. color(display-p3 1 0 0.2)) render accurately on high-DPI Apple Retina displays.