Fledex.Color.Correction (fledex v0.7.0)
View SourceDefinitions and functions to perform color corrections
Summary
Functions
This function corrects an led color with the specified correction.
Calculate the color correction for a single base color.
This function allows to combine several aspects of corrections together to a single correction.
This defines a color correction without correction. I.e. the rgb colors will be with
full brightness {255, 255, 255}
Functions
@spec apply_rgb_correction( [Fledex.Color.Types.rgb()], byte() | Fledex.Color.Types.rgb() ) :: [ Fledex.Color.Types.rgb() ]
This function corrects an led color with the specified correction.
The correction probably should be created by composing the different aspects
by using define_correction/3
Calculate the color correction for a single base color.
It expects the scale, the color correction and color temperature for the base color to calculate the correction for that base color.
@spec define_correction( byte(), Fledex.Color.Types.colorint(), Fledex.Color.Types.colorint() ) :: Fledex.Color.Types.rgb()
This function allows to combine several aspects of corrections together to a single correction.
The elements are:
- scale: Whether we want to have the full intensity (default 255, i.e. full intensity)
- color_correction: Probably one of the corrections defined in
Fledex.Color.Correction.Color - temperature_correction: Probably one of the corrections defined in
Fledex.Color.Correction.Temperature
@spec no_color_correction() :: Fledex.Color.Types.rgb()
This defines a color correction without correction. I.e. the rgb colors will be with
full brightness {255, 255, 255}