Struct dotrix_egui::epaint::color::Hsva [−]
Expand description
Hue, saturation, value, alpha. All in the range [0, 1]. No premultiplied alpha.
Fields
h: f32
hue 0-1
s: f32
saturation 0-1
v: f32
value 0-1
a: f32
alpha 0-1. A negative value signifies an additive color (and alpha is ignored).
Implementations
impl Hsva
impl Hsva
pub fn from_srgba_premultiplied(srgba: [u8; 4]) -> Hsva
pub fn from_srgba_premultiplied(srgba: [u8; 4]) -> Hsva
From sRGBA
with premultiplied alpha
pub fn from_srgba_unmultiplied(srgba: [u8; 4]) -> Hsva
pub fn from_srgba_unmultiplied(srgba: [u8; 4]) -> Hsva
From sRGBA
without premultiplied alpha
pub fn from_rgba_premultiplied([f32; 4]) -> Hsva
pub fn from_rgba_premultiplied([f32; 4]) -> Hsva
From linear RGBA with premultiplied alpha
pub fn from_rgba_unmultiplied([f32; 4]) -> Hsva
pub fn from_rgba_unmultiplied([f32; 4]) -> Hsva
From linear RGBA without premultiplied alpha
pub fn from_additive_rgb(rgb: [f32; 3]) -> Hsva
pub fn to_rgba_premultiplied(&self) -> [f32; 4]
pub fn to_rgba_unmultiplied(&self) -> [f32; 4]
pub fn to_rgba_unmultiplied(&self) -> [f32; 4]
Represents additive colors using a negative alpha.
pub fn to_srgba_premultiplied(&self) -> [u8; 4]
pub fn to_srgba_unmultiplied(&self) -> [u8; 4]
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Hsva
impl UnwindSafe for Hsva
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more