ExChroma (ex_chroma v0.1.0) View Source

Documentation for ExChroma.

Link to this section Summary

Functions

Colors are stored in a tuple as {R, G, B, A} allowed types are

iex()> ExChroma.rgb2hex({50, 50, 50, 1}) "323232" iex()> ExChroma.rgb2hex({50, 50, 50, 0.5}) "32323280"

Link to this section Functions

Colors are stored in a tuple as {R, G, B, A} allowed types are:

iex()> ExChroma.hex2rgb("#ABC") {170, 187, 204, 1} iex()> ExChroma.hex2rgb("#ABCD") {170, 187, 204, 0.87} iex()> ExChroma.hex2rgb("#ABCDEF") {171, 205, 239, 1} iex()> ExChroma.hex2rgb("#ABCDEF12") {171, 205, 239, 0.07} iex()> ExChroma.hex2rgb("123") {17, 34, 51, 1} iex()> ExChroma.hex2rgb("1234") {17, 34, 51, 0.27} iex()> ExChroma.hex2rgb("123456") {18, 52, 86, 1} iex()> ExChroma.hex2rgb("12345678") {18, 52, 86, 0.47}

iex()> ExChroma.rgb2hex({50, 50, 50, 1}) "323232" iex()> ExChroma.rgb2hex({50, 50, 50, 0.5}) "32323280"