Skip to main content

color_to_index

Function color_to_index 

Source
pub fn color_to_index(r: u8, g: u8, b: u8) -> u32
Expand description

Decodes a pick color back to an index.

The color is encoded as RGB where:

  • R contains bits 16-23
  • G contains bits 8-15
  • B contains bits 0-7