Function smol_rgb::linear_to_encoded[][src]

pub fn linear_to_encoded(input: f32) -> u8

This function takes an linear space f32 and outputs an encoded sRgb u8.

This is based on https://bottosson.github.io/posts/colorwrong/ and similar transfer functions.