On 22 May 2011, at 20:37, Jim Thorton wrote: If I select the following values, the AppleScript code above gives me {224,225,120} That code looks familiar...
set test to cmykrgb(0, 79, 41, 0)
I've quickly reviewed my calculations using your CMYK values as a reference. In your result {224,225,120} your R(ed) value is 224. The R calculation is 255 - (round (2.55 * (c + k))) and the only values of c and k that return 224 for this sum are where c+k=12, for example c=0 & k=12, c=1 & k=11, c=2 & k=10 and so on to c=12 and k=0. As you don't have any of these pairings in your CMYK values there's no chance of values being transposed. Also, if you take your c and k values of 0 and insert them in to "set r to 255 - (round (2.55 * (c + k)))" you get
255 - ( round (2.55 * (0 + 0))) = 255 - ( round (0)) = 255
Also, purely because of the way AppleScript's "round" function works (it rounds up or down to the nearest whole number) there's no way to obtain 225 using whole numbers. So there's something wrong with your copy of the cmykrgb function or the values you're passing to it aren't what you think they are.
Steve
---------------------------------
|