Setting color to the default layer

I’m creating Arabic fonts where some glyphs are colored (e.g. marks). The color applies to the entire glyph so COLR record for that glyph will be one layer that is the same as the uncolored glyph. Currently I have to duplicate such glyphs to set the color on the color layers, which is is not ideal as I now need to make sure the layers are always in sync and the fonts ends with needlessly duplicated glyphs.

Is there a way to set color on the base layer instead of duplicating it?

This is possible. Just the UI didn’t let you (I fixed that) assign a palette to the master layers.
But you can do that with a script:

Layer.attributes["colorPalette"] = 0

Will make the master layer use the first palette (adjust the number if needed).

1 Like

Thanks!