rgba

rgba($red, $green, $blue, $alpha) rgba($color, $alpha)

Creates a Color from red, green, blue, and alpha values.

Overloads:

  • rgba($red, $green, $blue, $alpha)

    Parameters:

    • $red (Number) The amount of red in the color. Must be between 0 and 255 inclusive or 0% and 100% inclusive
    • $green (Number) The amount of green in the color. Must be between 0 and 255 inclusive or 0% and 100% inclusive
    • $blue (Number) The amount of blue in the color. Must be between 0 and 255 inclusive or 0% and 100% inclusive
    • $alpha (Number) The opacity of the color. Must be between 0 and 1 inclusive

    Returns:

    • (Color)

    Raises:

    • (ArgumentError) if any parameter is the wrong type or out of bounds
  • rgba($color, $alpha)

    Sets the opacity of an existing color.

    Examples:

    rgba(#102030, 0.5) => rgba(16, 32, 48, 0.5)
    rgba(blue, 0.2)    => rgba(0, 0, 255, 0.2)

    Parameters:

    • $color (Color) The color whose opacity will be changed.
    • $alpha (Number) The new opacity of the color. Must be between 0 and 1 inclusive

    Returns:

    • (Color)

    Raises:

    • (ArgumentError) if $alpha is out of bounds or either parameter is the wrong type
doc_Sass
2016-11-11 13:09:21
Comments
Leave a Comment

Please login to continue.