Skip to main content

correct

Function correct 

Source
const fn correct(
    red: u8,
    green: u8,
    blue: u8,
    brightness_percent: u8,
) -> (u8, u8, u8)
Expand description

Apply brightness scaling and gamma correction to an RGB colour.

Each channel is scaled by brightness_percent via scale, then passed through the gamma-2.2 LUT, producing values ready for the LED driver.