---
title: "Customizing Color Fonts on the Web"
description: "WebKit (Safari 15.4+) supports the CSS `@font-palette-values` at-rule, which lets authors select a color font's predefined CPAL palettes by index and override individual palette colors, then apply them with the `font-palette` property."
url: "https://swe.quest/articles/customizing-color-fonts-on-the-web-74940ba780f012e8"
canonical: "https://webkit.org/blog/12662/customizing-color-fonts-on-the-web/"
source: "WebKit"
published: "2022-05-25"
difficulty: "medium"
kind: "How-to"
reading_minutes: 7
tags: ["css","browsers","frontend"]
---

# Customizing Color Fonts on the Web

A post on [WebKit](https://swe.quest/sources/webkit.md), published 2022-05-25, 7 min read, How-to. Original: [https://webkit.org/blog/12662/customizing-color-fonts-on-the-web/](https://webkit.org/blog/12662/customizing-color-fonts-on-the-web/)

## Summary

WebKit (Safari 15.4+) supports the CSS \`@font-palette-values\` at-rule, which lets authors select a color font's predefined CPAL palettes by index and override individual palette colors, then apply them with the \`font-palette\` property. Browsers without support fall back to palette 0, which can be guarded with \`@supports\`. \`font-palette: light\`/\`dark\` pick palettes the font marks for light or dark backgrounds and pair naturally with \`prefers-color-scheme\`. Because palette rules are scoped per font family, one palette name can map to different palettes across fallback fonts. Foreground-color shapes in some fonts follow the \`color\` property instead, and authors should keep palette contrast high for legibility.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [CSS](https://swe.quest/tags/css.md) (Web & mobile)
- [Browsers](https://swe.quest/tags/browsers.md) (Web & mobile)
- [Frontend](https://swe.quest/tags/frontend.md) (Web & mobile)

## Prerequisites

- CSS at-rules and properties ([easy posts on CSS](https://swe.quest/tags/css.md?difficulty=easy))
- Web fonts

## Keywords

@font-palette-values, font-palette, COLRv0, CPAL, Safari 15.4, WebKit

## Related posts

- [Add wide gamut P3 and alpha transparency to your color picker in HTML](https://swe.quest/articles/add-wide-gamut-p3-and-alpha-transparency-to-your-color-picker-in-html-2bf169620936554b.md): WebKit · 2025-05-07 · Medium · 4 min read · Browsers, Frontend, CSS
  \`\<input type="color"\>\` now supports two new optional attributes, \`alpha\` and \`colorspace\`, added to the HTML standard with WHATWG and first shipped in Safari 18.4.
- [How to have the browser pick a contrasting color in CSS](https://swe.quest/articles/how-to-have-the-browser-pick-a-contrasting-color-in-css-9cfb1d29a0334ca0.md): WebKit · 2025-05-13 · Medium · 12 min read · CSS, Accessibility, Browsers, Frontend
  CSS \`contrast-color()\` takes one color and returns black or white, whichever contrasts more, so a single variable like \`--button-color\` can drive both background and text, including hover states built with relative color syntax.
- [WebKit Features in Safari 17.5](https://swe.quest/articles/webkit-features-in-safari-17-5-db83d5ba970a4034.md): WebKit · 2024-05-13 · Medium · 9 min read · CSS, Browsers, Frontend
  Safari 17.5 ships seven features and 22 bug fixes, led by CSS additions: text-wrap: balance (with the text-wrap-style longhand), the light-dark() color function, @starting-style for entry transitions, and supports() conditions on @import rules.
- [WebKit Features in Safari 16.2](https://swe.quest/articles/webkit-features-in-safari-16-2-97104b4a5912e4d5.md): WebKit · 2022-12-13 · Medium · 4 min read · CSS, Browsers, Frontend
  Safari 16.2 focuses on cross-browser interoperability as part of Interop 2022, with Safari Technology Preview 159 passing 98.5% of the Interop tests.
- [Introducing Adaptive Dark Mode](https://swe.quest/articles/introducing-adaptive-dark-mode-b5085c9f9c7b77a6.md): WebKit · 2026-11-03 · Medium · 5 min read · Browsers, CSS, Accessibility, Privacy
  Safari 27.3 beta adds Adaptive Dark Mode, which automatically darkens light websites that don't declare dark mode support via color-scheme.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
