482
483
484
485
486
487
488
489
490
491
492
493
494
495
|
# File 'lib/sass/script/functions.rb', line 482
def hsla(hue, saturation, lightness, alpha)
assert_type hue, :Number, :hue
assert_type saturation, :Number, :saturation
assert_type lightness, :Number, :lightness
assert_type alpha, :Number, :alpha
Sass::Util.check_range('Alpha channel', 0..1, alpha)
h = hue.value
s = Sass::Util.check_range('Saturation', 0..100, saturation, '%')
l = Sass::Util.check_range('Lightness', 0..100, lightness, '%')
Color.new(:hue => h, :saturation => s, :lightness => l, :alpha => alpha.value)
end
|