|
![](/i/fill.gif) |
Hello everyone.
I had a desire to pull color values from Paintshop Pro in order to use them
in POV. The native color format is RGB-255 which, according to the help,
doesn't support 255 values, only 0 - 1 values. In order to translate
between the two formats I created my first macro and to my surprise, it
works!
Of course, it's possible that it wasn't necessary to do this but I wanted to
anyhow.
I'm not sure if posting code is ok here but I'm going to go out on a limb
and post it anyways.
#macro hexRGB2povRGB(RGB)
#local R = RGB.red;
#local G = RGB.blue;
#local B = RGB.green;
#local povR = (R / 2.55) / 100;
#local povG = (G / 2.55) / 100;
#local povB = (B / 2.55) / 100;
<povR,povG,povB>
#end
To use it, put it into a pigment statement like this:
pigment { color hexRGB2povRGB(<255,255,255>) }
Well, there you have it.
Aeroslin
Post a reply to this message
|
![](/i/fill.gif) |