Skip to content

[css-fonts-4] [color fonts] Ability to choose palette and colors by predefined name #1125

Closed
@RoelN

Description

@RoelN

Regarding 7.1. Controlling Color Font Palettes: The font-palette property, fonts with a CPAL table will be able to give custom names to palettes and their colors. See Palette Labels and Palette Entry Label in the OpenType spec.

If a font comes with a palette called "Toxic Green", would you be able to say font-palette: 'Toxic Green';? Or inside a @font-palette-values query say base-palette: 'Toxic Green';?

Overwriting colors would have to happen similarly, I suppose. So instead of (or along with)

@font-palette-values Augusta {
  font-family: Handover Sans;
  base-palette: 3;
  1: rgb(43, 12, 9);
  3: var(--highlight);
}

you should be able to do

@font-palette-values Augusta {
  font-family: Handover Sans;
  base-palette: 'Toxic Green';
  'Main fill': rgb(43, 12, 9);
  'Outline': var(--highlight);
}

where "Main fill" and "Outline" are entries in the Palette Entry Label table of the font.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions