colour_hash v1.0.1 ColourHash

Documentation for ColourHash.

Link to this section Summary

Functions

String hashed to colour hex string

String hashed to colour hsl tuple string iex> ColourHash.hsl("test") {75.76341127922971, 0.5, 0.5} iex> ColourHash.hsl("test", lightness: [0.1], saturation: [0.3, 0.9], hue_range: %{min: 150, max: 330} ) {187.88170563961486, 0.3, 0.1}

String hashed to colour rgb tuple string
iex> ColourHash.rgb("test")
{158, 191, 64}
iex> ColourHash.rgb("test", lightness: [0.1], saturation: [0.3, 0.9], hue_range: %{min: 50, max: 330} )
{21, 33, 18}

Link to this section Functions

Link to this function

hex(string, options \\ [])

String hashed to colour hex string

Examples

iex> ColourHash.hex("test")
"9EBF40"
iex> ColourHash.hex("test", lightness: [0.1], saturation: [0.1, 0.9], hue_range: %{min: 30, max: 30} )
"1C1A17"
Link to this function

hsl(string, options \\ [])

String hashed to colour hsl tuple string iex> ColourHash.hsl("test") {75.76341127922971, 0.5, 0.5} iex> ColourHash.hsl("test", lightness: [0.1], saturation: [0.3, 0.9], hue_range: %{min: 150, max: 330} ) {187.88170563961486, 0.3, 0.1}

Link to this function

rgb(string, options \\ [])

String hashed to colour rgb tuple string
iex> ColourHash.rgb("test")
{158, 191, 64}
iex> ColourHash.rgb("test", lightness: [0.1], saturation: [0.3, 0.9], hue_range: %{min: 50, max: 330} )
{21, 33, 18}