Return to Snippet

Revision: 41382
at February 17, 2011 04:20 by brandonjp


Initial Code
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

Initial URL
http://bit.ly/eP2mXS

Initial Description
Stolen from  stetho -- All thanks to AppleScript to convert CMYK to RGB values http://bit.ly/eP2mXS

Initial Title
AppleScript - convert text from RGB to CMYK color values

Initial Tags
convert

Initial Language
AppleScript