mirror of
https://github.com/Makuna/NeoPixelBus.git
synced 2025-08-07 12:54:26 +02:00
Updated RgbwColor object API (markdown)
@@ -76,6 +76,19 @@ Lighten will adjust the color by the given delta toward white.
|
||||
NOTE: This is a simple linear change. If the color only has W value set, only W will be modified; otherwise only the R,G,B will be modified leaving W alone.
|
||||
> * _delta_ - (0-255) the amount to lighten the color by.
|
||||
|
||||
### int16_t CompareTo(const RgbwColor& other, uint8_t epsilon = 1)
|
||||
Compares against another color with the given epsilon.
|
||||
Returns the greatest difference of a set of elements, where 0 means the colors are equal within epsilon delta, negative means this is less than the other, positive means this is greater than the other.
|
||||
> * _other_ - the color to compare against.
|
||||
> * _epsilon_ - the max delta acceptable for them to be considered the same color.
|
||||
|
||||
### static int16_t Compare(const RgbwColor& left, const RgbwColor& right, uint8_t epsilon = 1)
|
||||
Compares two colors with the given epsilon.
|
||||
Returns the greatest difference of a set of elements, where 0 means the colors are equal within epsilon delta, negative means left is less than the right, positive means left is greater than the right.
|
||||
> * _left_ - the first color to compare.
|
||||
> * _right_ - the other color to compare.
|
||||
> * _epsilon_ - the max delta acceptable for them to be considered the same color.
|
||||
|
||||
### static RgbwColor LinearBlend(RgbwColor left, RgbwColor right, float progress);
|
||||
This will blend between two colors by the amount defined by the progress variable.
|
||||
> * _left_ - the color to start the blend at.
|
||||
|
Reference in New Issue
Block a user