rgb_to_hex

Function rgb_to_hex 

Source
fn rgb_to_hex(input: &str) -> Result<String>
Expand description

Converts an RGB string to a hexadecimal color code.

Expects an input in the format of u8 R, G, B values. Whitespaces around components are trimmed.

ยงErrors

Returns an error if the input format is invalid or components cannot be parsed as u8.