Contents
Articles
Behaviors
Books
Director News
Director Web Sites
FAQ
Games
Mailing Lists
News Groups
Project Examples
Reviews
Software
Tools
Useful Web Sites
Utilities
Xtras

Don't miss these
Shadow Maker
Video Sprite
Color Fader-Alphamania
Implementing stacks in Lingo
Graph Class
Importer
toggle a global variable with button
Random Sprite Swap
Sprite generation
Impressario Find Dialog
 

 

 

Behavior RGB to CMYK

Added on 5/20/2000

 

Compatibilities:
D7 D8 Mac PC Script Shockwave

This item has not yet been rated

Author: EliyaSelhub

Converts an RGB value to a CMYK property list

-- this function takes an rgb color value as its argument and returns a cmyk property list.
-- cmyk values are expressed as percentages from 0 to 1
-- a yellow value of 0.5 signifies 50% yellow
on cmyk rgbval
  cyan = ( 255 - rgbval.red ) / 255.0
  magenta = ( 255 - rgbval.green ) / 255.0
  yellow = ( 255 - rgbval.blue ) / 255.0
  black = min ( [ cyan, magenta, yellow ] )
  cmykval = [ #cyan: cyan, #magenta: magenta, #yellow: yellow, #black: black]
  return cmykval
end

 


Contact

MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA

Send e-mail