On the color layer, I have paths with red (#FF1950) and green strokes. I need to change all the red (only) strokes to blue. Here’s what I tried:
from GlyphsApp.plugins import NSColor
for layer in Glyphs.font.selectedLayers:
for path in layer.paths:
if path.attributes["strokeColor"] == "NSCalibratedRGBColorSpace 1 0.0980392 0.313725 1":
path.attributes["strokeColor"] = NSColor.colorWithString_("#646EE1")
However the check doesn’t work and nothing happens after if line.
print(path.attributes) gives me the next output:
{
strokeColor = "NSCalibratedRGBColorSpace 1 0.0980392 0.313725 1";
strokeWidth = 30;
}
Should I check the stroke color somehow differently?