Posted By

brandonjp on 02/17/11


Tagged

applescript colors convert RGB cmyk


Versions (?)

AppleScript - convert text from RGB to CMYK color values


 / Published in: AppleScript
 

URL: http://bit.ly/eP2mXS

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

  1. on cmykrgb(c, m, y, k)
  2.  
  3. set r to 255 - (round (2.55 * (c + k)))
  4. set g to 255 - (round (2.55 * (m + k)))
  5. set b to 255 - (round (2.55 * (y + k)))
  6.  
  7. if (r < 0) then set r to 0
  8. if (g < 0) then set g to 0
  9. if (b < 0) then set b to 0
  10.  
  11. return {r, g, b}
  12. end cmykrgb

Report this snippet  

You need to login to post a comment.