134 {
135 if (amountOfP2 == 0) { return p1; }
136 if (amountOfP2 == 255) { return p2; }
137
140 const float amount = static_cast<float>(amountOfP2) / 255.0f;
141 const Oklab mixed = {
142 first.lightness + (second.lightness - first.lightness) * amount,
143 first.green_red + (second.green_red - first.green_red) * amount,
144 first.blue_yellow + (second.blue_yellow - first.blue_yellow) * amount,
145 };
147}
CRGB oklabToRgb(const Oklab &lab) FL_NO_EXCEPT
Oklab rgbToOklab(const CRGB &rgb) FL_NO_EXCEPT