Conversions to/from RGB.
Examples
iex> Pote.Converters.RGB.to_hex({255, 128, 0})
"#FF8000"
iex> Pote.Converters.RGB.to_cmyk({255, 128, 0})
{0.0, 49.8, 100.0, 0.0}
Summary
Functions
Blends two RGB colors with a given factor.
Clamps a value to the 0-255 range.
Calculates the Manhattan distance between two RGB colors.
Converts hexadecimal to RGB.
Converts RGB to CMYK.
Converts RGB to hexadecimal.
Converts RGB to HSL.
Converts RGB to HSV.
Converts RGB to XTerm256.
Types
Functions
Blends two RGB colors with a given factor.
@spec clamp(integer()) :: 0..255
Clamps a value to the 0-255 range.
@spec color_distance(rgb(), rgb()) :: non_neg_integer()
Calculates the Manhattan distance between two RGB colors.
Converts hexadecimal to RGB.
Converts RGB to CMYK.
Converts RGB to hexadecimal.
Converts RGB to HSL.
Converts RGB to HSV.
Converts RGB to XTerm256.