googlefonts / colr-gradients-spec

63 stars 8 forks source link

CPAL can't reference foreground color #354

Open rsheeter opened 3 years ago

rsheeter commented 3 years ago

COLR can reference the application defined foreground color. It would appear CPAL cannot. That means you can't do things like have one palette that says to draw in the foreground color and another that assigns specific colors.

The external application may be able to simply override the colors one by one.

Credit Khaled for pointing this out.

behdad commented 3 years ago

Correct...

We can possibly redefine rgba value #FFFFFF00, which is one of the 2^24 different representations of fully-transparent color, to mean "foreground".

Lorp commented 1 year ago

Using #FFFFFF00 conflicts with (a future) variable CPAL. It seems reasonable to:

  1. use #FFFFFF00 as the default of a white fill that varies in CPAL from 0% to 100% opacity
  2. define opacity for foreground colour in CPAL

Note that PaintSolid/PaintVarSolid already allows specification of variable opacity for white and for foreground in COLR.