W3C home > Mailing lists > Public > public-css-archive@w3.org > March 2017

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

From: Roel N via GitHub <sysbot+gh@w3.org>
Date: Fri, 24 Mar 2017 15:49:05 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-216826911-1490370544-sysbot+gh@w3.org>
RoelN has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-fonts-4] [color fonts] Ability to choose palette and colors by predefined name ==
Regarding [7.1. Controlling Color Font Palettes: The font-palette property](https://drafts.csswg.org/css-fonts-4/#font-palette-prop), 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](https://www.microsoft.com/typography/otspec/cpal.htm).

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.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1125 using your GitHub account
Received on Friday, 24 March 2017 15:49:12 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 9 October 2019 08:16:31 UTC