Color constant to/from string?
-
Thanks.
I was more looking for something like
Print(convertToStr(red))
which would give me the output:
redand then something like
Print(convertToColor("red"))
which would output something like:
1.0000, 0.0000, 0.0000, 0.0000(...that is the color rgba vector for red).
-
How many colors ?
-
@vinicity I don't think there is a way currently. Leave it with me and I'll see if I can do a user function
-
You might run into trouble just looked at the color section and thought
Maroon
Darkred
And burgundy looked pretty similar
Tried all three and burgundy doesn't exist
It looks like they've named about a hundred colors out of a possible (2 to the power 24) -
Yes this will only work for colo(u)rs with defined constants. I think burgundy was a typo it is in as burgandy
-
Burgandy doesn't work either
-
It is not syntax highlighting but it is displaying OK:
loop clear(burgandy) update() repeat
-
@pianofire Thanks!
-
@vinicity Here you go try this: https://fuzearena.com/forum/topic/957/functions-to-convert-from-a-string-to-a-colour-constant-and-vice-versa
Let me know if you find any problems
-
@pianofire Thanks a lot! Exactly what I needed!