def hsla(hue, saturation = nil, lightness = nil, alpha = nil)
      if saturation.nil?
        return unquoted_string("hsla(#{hue})") if var?(hue)
        raise ArgumentError.new("wrong number of arguments (1 for 4)")
      elsif lightness.nil?
        return unquoted_string("hsla(#{hue}, #{saturation})") if var?(hue) || var?(saturation)
        raise ArgumentError.new("wrong number of arguments (2 for 4)")
      elsif alpha.nil?
        if var?(hue) || var?(saturation) || var?(lightness)
          return unquoted_string("hsla(#{hue}, #{saturation}, #{lightness})")
        else
          raise ArgumentError.new("wrong number of arguments (2 for 4)")
        end
      end

      if special_number?(hue) || special_number?(saturation) ||
         special_number?(lightness) || special_number?(alpha)
        return unquoted_string("hsla(#{hue}, #{saturation}, #{lightness}, #{alpha})")
      end
      assert_type hue, :Number, :hue
      assert_type saturation, :Number, :saturation
      assert_type lightness, :Number, :lightness
      assert_type alpha, :Number, :alpha

      h = hue.value
      s = saturation.value
      l = lightness.value

      # Don't store the string representation for function-created colors, both
      # because it's not very useful and because some functions aren't supported
      # on older browsers.
      Sass::Script::Value::Color.new(
        :hue => h, :saturation => s, :lightness => l,
        :alpha => percentage_or_unitless(alpha, 1, "alpha"))
    end
def hsla(hue, saturation = nil, lightness = nil, alpha = nil)
      if saturation.nil?
        return unquoted_string("hsla(#{hue})") if var?(hue)
        raise ArgumentError.new("wrong number of arguments (1 for 4)")
      elsif lightness.nil?
        return unquoted_string("hsla(#{hue}, #{saturation})") if var?(hue) || var?(saturation)
        raise ArgumentError.new("wrong number of arguments (2 for 4)")
      elsif alpha.nil?
        if var?(hue) || var?(saturation) || var?(lightness)
          return unquoted_string("hsla(#{hue}, #{saturation}, #{lightness})")
        else
          raise ArgumentError.new("wrong number of arguments (2 for 4)")
        end
      end

      if special_number?(hue) || special_number?(saturation) ||
         special_number?(lightness) || special_number?(alpha)
        return unquoted_string("hsla(#{hue}, #{saturation}, #{lightness}, #{alpha})")
      end
      assert_type hue, :Number, :hue
      assert_type saturation, :Number, :saturation
      assert_type lightness, :Number, :lightness
      assert_type alpha, :Number, :alpha

      h = hue.value
      s = saturation.value
      l = lightness.value

      # Don't store the string representation for function-created colors, both
      # because it's not very useful and because some functions aren't supported
      # on older browsers.
      Sass::Script::Value::Color.new(
        :hue => h, :saturation => s, :lightness => l,
        :alpha => percentage_or_unitless(alpha, 1, "alpha"))
    end
Creates a {Sass::Script::Value::Color Color} from hue,
 saturation, lightness, and alpha values. Uses the algorithm from
 the [CSS3 spec][].

 [CSS3 spec]: http://www.w3.org/TR/css3-color/#hsl-color

 @see #hsl
 @overload hsla($hue, $saturation, $lightness, $alpha)
   @param $hue [Sass::Script::Value::Number] The hue of the color. Should be
     between 0 and 360 degrees, inclusive
   @param $saturation [Sass::Script::Value::Number] The saturation of the
     color. Must be between `0%` and `100%`, inclusive
   @param $lightness [Sass::Script::Value::Number] The lightness of the
     color. Must be between `0%` and `100%`, inclusive
   @param $alpha [Sass::Script::Value::Number] The opacity of the color. Must
     be between 0 and 1, inclusive
 @return [Sass::Script::Value::Color]
 @raise [ArgumentError] if `$saturation`, `$lightness`, or `$alpha` are out
   of bounds or any parameter is the wrong type