Colours in XML

psonice's picture

Anyone happen to know what format colours should be in if you import them from an xml file? The obvious ones (colour="0.70,0.70,0.70,1.0" and colour="RGBA=[0.70,0.70,0.70,1.0]") don't work.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

cwright's picture
xml

I don't know that the xml patch supports color importing. It looks like it just parses strings, so you may have to have some parsing to generate color data from the parsed xml stuff.

But to be honest, I've not used the xml patch for much of anything, so I may be mistaken; I've just never seen it output anything other than a structure of strings.

tobyspark's picture
in cocoaland...

...nscolor isn't "plist compatible" so it won't write to and from xml in string form. you'd need a custom reader written that parses a string and returns a colour.

psonice's picture
Oversight?

Ok, thanks for the replies. It seems like a bit of an oversight to leave colours out. I'll have to do without colours for now.