More Glyphs colors

Hello! Is there an option to use more colors to color the glyphs other than the default? Thanks!
Screenshot 2022-11-13 at 1.47.18 AM

12 colours are not enough? May I ask what you need more colours for?

1 Like

You can set extra colors via scripting. But why? It gets hard to differentiate.

1 Like

I have MANY glyphs. I need to categorize them by colors. And then subcategorize them. It’s just gonna be way more convenient for me to have more colors. Yes, I’m using filters, which help to separate to groups. But still, I need more colors. If possible :slight_smile:

Gan you give an example on what you do with the categories?
Maybe you can combine colors with tags?

1 Like

I’m working with many swashes. I have groups of swashes. And same groups but with different anchors. And the same groups with some changes… I need to have a better view. The same colors over and over again are confusing… I know it’s not a traditional request. I guess my design is not traditional :slight_smile: I would like to use one color in one group… and then with a few tints for the subgroup… and then another color and its tint to the second group and so on… I used to do it in Robofont. But I moved to Glyphs which is a life changer. But really need this feature if possible.

What you want to do is way better done with tags. Have you looked into tags already? Try @FlorianPircher’s GutenTag plug-in.

You can set any NSColor through scripting, if you really want to go with colors though.

1 Like

The problem with the manually set colors is that you can’t filter for them.

1 Like

Sure, I’m working with tags. It helps. But it will be much more convenient to have the freedom to select other colors. What is the reason for limiting users to 12 colors? I normally color one section and then use tints… Another idea is to limit it to 12 colors but let the user decide the colors. That way, they can always change the colors, But they are limited to 12 swatches. Maybe it’s something to think about.

If I will Tag them, I won’t be able to filter them?

This is possible:

from AppKit import NSArchiver, NSColor
colors = [
	NSColor.colorWithString_("#ff0000"),
	NSColor.colorWithString_("#00ff00"),
	NSColor.colorWithString_("#0000ff"),
	NSColor.colorWithString_("#ff8888"),
	NSColor.colorWithString_("#88ff88"),
	NSColor.colorWithString_("#8888ff"),
	NSColor.colorWithString_("#00ffff"),
	NSColor.colorWithString_("#ff00ff"),
	NSColor.colorWithString_("#ffff00"),
	NSColor.colorWithString_("#88ffff"),
	NSColor.colorWithString_("#ff88ff"),
	NSColor.colorWithString_("#ffff88"),
]
encodedColors = [NSArchiver.archivedDataWithRootObject_(x) for x in colors]
Glyphs.defaults["LabelColors"] = encodedColors

You need to define 12 custom colors as NSColor values. There are many ways to create an NSColor, but one of the easiest is to use the #______ color strings as in the code above. You can use a tool like https://color.xgc.io to select colors and get their color strings.

After you replaced the 12 color strings with the colors you want, run the script in the Macro Panel. Then, relaunch Glyphs for the new colors to be used:

2 Likes

You can filter for tags. Tags allow for more powerful filtering than color labels since you can have multiple tags assigned to the same glyph.

1 Like

For sure. I use it all the time. But because I have many glyphs, I needed more colors.

1 Like

Super cool, Thanks! I’ll try it now!

Works perfectly fine. So much better! Thank you @FlorianPircher