static public Method

CMYK.new(c = 0, m = 0, y = 0, k = 0)

Creates a CMYK colour object from percentages. Internally, the colour is managed as fractional values 0..1.

Color::CMYK.from_fraction(30, 0, 80, 30)

Source Code

# File color/cmyk.rb, line 54
def initialize(c = 0, m = 0, y = 0, k = 0)
  @c = c / 100.0
  @m = m / 100.0
  @y = y / 100.0
  @k = k / 100.0
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.