I have a file of several thousand color values of rgb, They are all represented by the numbers 0 to 255. How can I convert them to the numbers Panorama uses?
Well, you could multiply them by 256.
You could also convert them to 2 digit hex values, combine them, and use them with the htmlrgb( function.
When you use the OS X Color Picker and choose the tab with the RGB sliders, then you get the numeric RGB values as well as the hex code.
If I understand correctly, Steve has a text file that already has the rgb values he wants to use, so he isn’t going to use the color picker.
By the way, I pretty much never use the separate red green blue values any more, I just use the html #rrggbb
notation. I don’t know if you noticed, but in Panorama X you don’t even have to use the htmlrgb(
function any more, or the rgb(
function for that matter, if Panorama sees text in the #rrggbb
notation, automatically treats it as a color. For example, this is pure red:
#FF0000
and the line above is exactly equivalent to:
rgb(65535,0,0)
I was looking through the help file and I am not sure how I would convert the rib to hex. If I multiply by 256 the number is greater than 65535. I must be doing something wrong.
I found it. It was in the Graphic Editor Demo File. The formula is hexstr(redValue[-2,-1]+hexstr(greenValue)[-2,-1]+hexstr(blueValue)[-2,-1]