module Sass::Script::Functions

def alpha(*args)

Raises:
  • (ArgumentError) - If `color` isn't a color

Other tags:
    See: #transparentize -
    See: #opacify -

Returns:
  • (Number) -

Parameters:
  • color (Color) --

Overloads:
  • def alpha(color)
def alpha(*args)
  if args.all? do |a|
      a.is_a?(Sass::Script::String) && a.type == :identifier &&
        a.value =~ /^[a-zA-Z]+\s*=/
    end
    # Support the proprietary MS alpha() function
    return Sass::Script::String.new("alpha(#{args.map {|a| a.to_s}.join(", ")})")
  end
  opacity(*args)
end