View Source Imglab.Color (imglab v0.3.0)
Provides a set of macros to specify color parameter values.
Link to this section Summary
Functions
Returns a named color as string. Useful to use a named color checking possible typos.
Returns a RGB color as string.
Returns a RGBA color as string.
Link to this section Functions
Returns a named color as string. Useful to use a named color checking possible typos.
examples
Examples
iex> Imglab.Color.color("blue")
"blue"
iex> Imglab.Color.color("green")
"green"
iex> Imglab.Color.color("white")
"white"
Returns a RGB color as string.
examples
Examples
iex> Imglab.Color.color(128, 128, 128)
"128,128,128"
iex> Imglab.Color.color(255, 128, 50)
"255,128,50"
iex> Imglab.Color.color(255, 0, 0)
"255,0,0"
Returns a RGBA color as string.
examples
Examples
iex> Imglab.Color.color(128, 128, 128, 128)
"128,128,128,128"
iex> Imglab.Color.color(255, 128, 128, 50)
"255,128,128,50"
iex> Imglab.Color.color(255, 128, 0, 0)
"255,128,0,0"