G.mark by colorName

  • Hello,

    Wouldn’t be nice if the color marking looks for (also) the color name it set in?
    Now, if I change a color in the prefs it will not be updated since only RGBA is stored in the .glif.


  • Yup, I already had a solution:

    f = CurrentFont()
    g = CurrentGlyph()
    red = (1,0,0,1)
    cyan = (0,1,1,1)
    for g in f:
        if g.mark == cyan:
            g.mark = red


  • admin

    The name is just as reference and has no other meaning. The color data in side a UFO is idd stored as an RGBA tuple.

    A small tip:
    you can search for colors (see screenshot)

    good luck