Color scales for encoding data with colors.
Provides sequential and diverging color scales with various built-in color schemes.
Summary
Functions
Applies the scale to get a color
Returns 0: a colour scale has no bandwidth
Enables or disables clamping
Creates a diverging color scale
Sets the domain
Returns nil: a colour scale is not invertible
Identity
Identity: a colour scale has no padding
Sets the range (color interpolator)
Gets a color scheme by name
Returns the list of available color schemes
Creates a sequential color scale
Linear.ticks/2 over the domain's extent: [d0, d1] sequential, [d0, d2] diverging
Types
Functions
Applies the scale to get a color
@spec bandwidth(t()) :: 0
Returns 0: a colour scale has no bandwidth
Enables or disables clamping
Creates a diverging color scale
Sets the domain
Returns nil: a colour scale is not invertible
Identity
Identity: a colour scale has no padding
Sets the range (color interpolator)
Gets a color scheme by name
@spec schemes() :: [atom()]
Returns the list of available color schemes
Creates a sequential color scale
Linear.ticks/2 over the domain's extent: [d0, d1] sequential, [d0, d2] diverging