Dear AppleScripter,
Hello. I can honestly say that I know little about the color. I do know what the color depth means. Anyway, when you pick a color through the Color Picker window, you will get different code representations like RGB, HSV, CMYK... If t I have a color in RGB, I wonder how I can translate it into CMYK? For example, if I have an RGB color of {228,255,91}, the color picker says its CMYK representation is {12,0,53,0}. Is it possible for us to somehow get this translation easily with AppleScript?
In the meantime, I've found the following reverse translation code on multiple websites.
on cmykrgb(c, m, y, k) set r to 255 - (round (2.55 * (c + k))) set g to 255 - (round (2.55 * (m + k))) set b to 255 - (round (2.55 * (y + k))) if (r < 0) then set r to 0 if (g < 0) then set g to 0 if (b < 0) then set b to 0 return {r, g, b}
end cmykrgb
If I select the following values, the AppleScript code above gives me {224,225,120}, which is not consistent with what the Color Picker window would give me. So the reverse translation code simply doesn't work?
set c to 0 set m to 79 set y to 41 set k to 0
Thank you for your advice,
Jim |