A driver for controlling RGB LEDs using PWM, with gamma correction
crates.io
crates.io
I would sort of understand a helper to set a color component, through a gamma curve, into a SetDutyCycle implementation, but even that seems a bit weird — sRGB is usually used for images, and you’d probably want some dithering. But even if the goal is just to use an online color picker to pick and LED color, you’d probably want to convert to a linear scale at compile time and you would absolutely want to use all available precision, which would involve doing actual math instead of using a table.
Now that it’s got some attention, it seems worth spending more time improving it.