AppleScript - convert text from RGB to CMYK color values


/ Published in: AppleScript
Save to your folder(s)

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


Copy this code and paste it in your HTML
  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

URL: http://bit.ly/eP2mXS

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.