View Source Color (ExUnion v0.1.2)
Link to this section Summary
Link to this section Types
@type t() :: union()
@type union() :: Color.Hsla.t() | Color.Hsl.t() | Color.Rgba.t() | Color.Rgb.t() | Color.Hex.t()
@type union_hex() :: Color.Hex.t()
@type union_hsl() :: Color.Hsl.t()
@type union_hsla() :: Color.Hsla.t()
@type union_rgb() :: Color.Rgb.t()
@type union_rgba() :: Color.Rgba.t()
Link to this section Functions
@spec hex(string :: String.t()) :: Color.Hex.t()
See Color.Hex.new/1
.
@spec hsl(fields :: %{hue: 0..360, saturation: float(), lightness: float()}) :: Color.Hsl.t()
@spec hsl(fields :: [hue: 0..360, saturation: float(), lightness: float()]) :: Color.Hsl.t()
See Color.Hsl.new/1
.
@spec hsl(hue :: 0..360, saturation :: float(), lightness :: float()) :: Color.Hsl.t()
See Color.Hsl.new/3
.
@spec hsla( fields :: %{ hue: 0..360, saturation: float(), lightness: float(), alpha: float() } ) :: Color.Hsla.t()
@spec hsla( fields :: [ hue: 0..360, saturation: float(), lightness: float(), alpha: float() ] ) :: Color.Hsla.t()
See Color.Hsla.new/1
.
@spec hsla( hue :: 0..360, saturation :: float(), lightness :: float(), alpha :: float() ) :: Color.Hsla.t()
See Color.Hsla.new/4
.
@spec rgb(fields :: %{red: 0..255, green: 0..255, blue: 0..255}) :: Color.Rgb.t()
@spec rgb(fields :: [red: 0..255, green: 0..255, blue: 0..255]) :: Color.Rgb.t()
See Color.Rgb.new/1
.
@spec rgb(red :: 0..255, green :: 0..255, blue :: 0..255) :: Color.Rgb.t()
See Color.Rgb.new/3
.
@spec rgba(fields :: %{red: 0..255, green: 0..255, blue: 0..255, alpha: float()}) :: Color.Rgba.t()
@spec rgba(fields :: [red: 0..255, green: 0..255, blue: 0..255, alpha: float()]) :: Color.Rgba.t()
See Color.Rgba.new/1
.
@spec rgba(red :: 0..255, green :: 0..255, blue :: 0..255, alpha :: float()) :: Color.Rgba.t()
See Color.Rgba.new/4
.