Method: Sass::Script::Value::Helpers#rgb_color
- Defined in:
- lib/sass/script/value/helpers.rb
#rgb_color(red, green, blue, alpha = nil) ⇒ Sass::Script::Value::Color
Construct a Sass Color from rgb values.
48 49 50 51 52 |
# File 'lib/sass/script/value/helpers.rb', line 48
def rgb_color(red, green, blue, alpha = nil)
attrs = {:red => red, :green => green, :blue => blue}
attrs[:alpha] = alpha if alpha
Color.new(attrs)
end
|