class Sass::Script::Color
def initialize(rgb)
-
(Sass::SyntaxError)
- if any color value isn't between 0 and 255
Parameters:
-
rgb
(Array
) -- A three-element array of the red, green, and blue values (respectively)
def initialize(rgb) rgb = rgb.map {|c| c.to_i} raise Sass::SyntaxError.new("Color values must be between 0 and 255") if rgb.any? {|c| c < 0 || c > 255} super(rgb) end