Module palette::named

source ·
Expand description

A collection of named color constants. Can be toggled with the "named" and "named_from_str" Cargo features.

They are taken from the SVG keyword colors (same as in CSS3) and they can be used as if they were pixel values:

use palette::Srgb;
use palette::named;

//From constant
let from_const = Srgb::<f32>::from_format(named::OLIVE).into_linear();

Constants