RandomColour (random_colour v0.1.0) View Source

Link to this section Summary

Link to this section Types

Specs

hsv() :: {integer(), integer(), integer()}

Specs

hue_range() :: {integer(), integer()}

Specs

options() :: [
  alpha: float(),
  count: non_neg_integer(),
  hue: String.t(),
  format: String.t(),
  seed: integer() | String.t(),
  luminosity: String.t()
]

Specs

rgb() :: {integer(), integer(), integer()}

Link to this section Functions

Specs

component_to_hex(integer()) :: String.t()

Specs

generate(options()) :: String.t() | tuple() | [tuple()]

Specs

get_colour_info() :: map()

Specs

get_colour_info(String.t()) :: map()
get_colour_info(integer()) :: map()
get_colour_info(integer()) :: map()

Specs

get_hue_range() :: hue_range()
Link to this function

get_hue_range(colour_input)

View Source

Specs

get_hue_range(integer()) :: hue_range()
get_hue_range(String.t()) :: hue_range()
get_hue_range(any()) :: hue_range()
Link to this function

get_minimum_brightness(h, s)

View Source

Specs

get_minimum_brightness(integer(), integer()) :: integer()

Specs

get_predefined_hues() :: [String.t()]

Specs

get_real_hue_range(integer()) :: map()
get_real_hue_range(String.t()) :: map()

Get The range of given hue when options.count!=0

Link to this function

get_saturation_range(hue)

View Source

Specs

get_saturation_range(integer()) :: hue_range()

Specs

hex_to_hsb(String.t()) :: {number(), number(), number()}

Specs

hsv_to_hex(hsv()) :: String.t()

Specs

hsv_to_hsl(hsv()) :: tuple()

Specs

hsv_to_rgb(hsv()) :: rgb()
Link to this function

pick_brightness(h, s, opts)

View Source

Specs

pick_brightness(integer(), integer(), options()) :: integer()

Specs

pick_hue(options()) :: integer()
Link to this function

pick_saturation(hue, opts)

View Source

Specs

pick_saturation(integer(), options()) :: integer()
Link to this function

random_within(range, opts)

View Source

Specs

random_within(hue_range(), options()) :: integer()
Link to this function

set_format(hsv, opts \\ [])

View Source

Specs

set_format(hsv(), options()) :: String.t() | tuple()
Link to this function

string_to_integer(string)

View Source

Specs

string_to_integer(String.t()) :: integer()