The attempt here is to provide something similar to https://gka.github.io/chroma.js/ but also idiomatic Elm.
Return a new configuration and a function from a float to color based on default values and the given colors.
Return a new configuration and a function from a float to color based on a new domain, colors (must be the same length as the domain) and default configuration.
Calculate the distance in RGB 255 color space.
Mix two colors, first converting them to the same color space mode and then with a ratio.
Mix two colors defined as a string, first converting them to the same color space mode and then with a ratio.
Remove a fraction of the color gradient (0 -> 1). Applies both sides the same.
Remove a fraction of the color gradient (0 -> 1).
Return the data with the given colors and a new list of colors.
Return the data with the given colors and a new list of colors.
Find the average of a non-empty list of colors, first converting them to the same color space mode.
Only supports RGBA, CYMK and LAB.
Find the average of a non-empty list of colors defined as strongs, first converting them to the same color space mode.
Only supports RGBA, CYMK and LAB.
Create breaks/classes based on the data given.
Supports: CkMean (a variant of kMeans), Equal, Logarithmic, and Quantile.
Return a new configuration and a function from a float to color based on the given configuration values, the given colors and the total number of colors (bins) to return.
Return a new configuration and a function from a float to color based on the given configuration values, the given colors and a predefined set of breaks/classes.
Return a new configuration and a function from a float to color based on default values - colors White to Black, domain 0 - 1.
Return a new configuration and a function from a float to color based on the given configuration values and the given colors.
Return a new configuration and a function from a float to color based on a new domain, an existing configuration, and colors (must be the same length as the domain).
Given a valid hex string (8, 6 or 3) produce an RGB Color.