g.mark by colorName

RoboFont Forums Enhancements g.mark by colorName

Tagged: 

This topic contains 2 replies, has 2 voices, and was last updated by  Thom 8 years, 2 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #4324

    Thom
    Participant

    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 het prefs it will not be updated since only RGBA is in stored the .glif.

    Thom

    #4325

    frederik
    Keymaster

    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

    Attachments:
    You must be logged in to view attached files.
    #4327

    Thom
    Participant

    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
            g.update()
    

    :)

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.