font-palette
Widely availableSince 202297% of users
Selects a pre-defined color palette for color fonts. Lets you apply different color schemes to emoji and color glyphs.
What's modern
From web-features, MDN's browser data and our snippets, checked dailyModernIn every major browser since November 2022. Widely available since May 2025.
The old way and the modern waySee the snippet: Color font palettes without multiple font files →
Old way 13 lines
/* separate font files per theme */
@font-face {
font-family: "BrandBlue";
src: url("brand-blue.woff2") format("woff2");
}
@font-face {
font-family: "BrandGrey";
src: url("brand-grey.woff2") format("woff2");
}
.logo { font-family: "BrandBlue", fantasy; }
@media (prefers-color-scheme: dark) {
.logo { font-family: "BrandGrey", fantasy; }
}Modern 10 lines
@font-palette-values --brand {
font-family: "Nabla";
base-palette: 2;
override-colors: 0 #38bdf8, 1 #0f172a;
}
.logo {
font-family: "Nabla", fantasy;
font-palette: --brand;
}
/* one color font, custom palette, no second file */See how modern your own CSS is.Check your CSS →
Quick facts
- Initial value
normal- Inherited
- Yes
Quick example
.dark { font-palette: dark; }
.emoji { font-palette: emoji; }Syntax
normal | light | dark | <palette-identifier> | <palette-mix()>Examples
Use a predefined color palette from a variable font
@supports (font-palette: light) {
.heading {
font-family: "Noto Color Emoji", sans-serif;
font-palette: light; /* Uses light palette from font */
}
}Many modern fonts include multiple color palettes. Use font-palette to switch between them without downloading multiple files.
Create light and dark mode themes
:root[data-theme="light"] {
font-palette: light;
}
:root[data-theme="dark"] {
font-palette: dark;
}Switch between light and dark color palettes in fonts that support multiple palettes, great for theme switching.
Override palette colors with CSS variables
@supports (font-palette: 0) {
.emoji {
font-palette: 0; /* Use first palette */
--c0: rgb(255, 0, 0); /* Override specific palette colors */
}
}Some fonts let you override individual palette colors with CSS custom properties.
Common pitfalls
- Only works with variable fonts that include palettesNot all fonts support font-palette. It only works with color fonts (like Noto Color Emoji or fonts with @font-palette-values defined).
- Limited browser supportfont-palette is relatively new (2024). Use @supports to check support and provide fallbacks for older browsers.
- Palette indices are font-specificIf you use palette index (0, 1, 2) instead of named palettes, switching fonts breaks your styling. Use named palettes (light, dark) when possible.
font-palette browser support
BaselineWidely availableThis feature is well established and works across many devices and browser versions. It has been available across browsers since 2022.Safe to use without fallbacks.
Usage97%of people can use this3% use a browser without it.
Browsers
101+
107+
15.4+
101+Mobile
101+Android
107+Android
15.4+iOS