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