pub fn palette_color<S: ToString>(name: S) -> Option<RGBA>
Expand description

Retrieve a palette color by name from the global registry. Returns Some(RGBA) if the color is registered, None if it is not.

§Arguments

  • name - the requested name.

§Example

use bracket_color::prelude::*;
register_palette_color("red", RED);
let color = palette_color("red").expect("Cannot find red");