Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Gamemap |
With ColorN("black")
you get 0,0,0,1
.
Is it possible to invert this, so I can get the string name back?
Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Gamemap |
With ColorN("black")
you get 0,0,0,1
.
Is it possible to invert this, so I can get the string name back?
Reply From: | Calinou |
The var2str()
and str2var()
functions can be used to convert any Variant (including Color) to a string and back to the original Variant. However, Color8 and ColorN are different ways to create Colors, but they are not dedicated Variant types. This means you will get a Color instead of the ColorN with the string name.
So there is currently no possible way to make 0,0.74902,1,1
to deepskyblue
?
Gamemap | 2021-08-07 12:41