Struct dx::foundation::colorspace::RgbColor
source · [−]Expand description
Rgb color representation with u8 components
Fields
red: u8
Red component
green: u8
Green component
blue: u8
Blue component
Implementations
Trait Implementations
sourceimpl GetAlpha<RgbColor> for RgbaColor
impl GetAlpha<RgbColor> for RgbaColor
sourcefn get_opacity(&self) -> f32
fn get_opacity(&self) -> f32
Retrieve the alpha component as opacity
sourcefn get_transparency(&self) -> f32
fn get_transparency(&self) -> f32
Retrieve the alpha component as transparency
impl ColorSpace for RgbColor
impl ColorTransition for RgbColor
impl Copy for RgbColor
impl Eq for RgbColor
impl NonRadialSpace for RgbColor
impl NonSaturationSpace for RgbColor
impl StructuralEq for RgbColor
impl StructuralPartialEq for RgbColor
Auto Trait Implementations
impl RefUnwindSafe for RgbColor
impl Send for RgbColor
impl Sync for RgbColor
impl Unpin for RgbColor
impl UnwindSafe for RgbColor
Blanket Implementations
sourceimpl<C> AdjustHue for C where
C: Clone + GetHue + SetHue,
impl<C> AdjustHue for C where
C: Clone + GetHue + SetHue,
sourcefn adjust_hue(self, delta: f32) -> C
fn adjust_hue(self, delta: f32) -> C
Adjust hue component of color with delta
sourcefn complement(self) -> Self
fn complement(self) -> Self
Rotate hue component with 180 degrees
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Fr, To> FromColor<Fr> for To where
To: From<Color>,
Fr: Into<Color>,
impl<Fr, To> FromColor<Fr> for To where
To: From<Color>,
Fr: Into<Color>,
sourcefn from_color(from_color: Fr) -> To
fn from_color(from_color: Fr) -> To
Convert from color
sourceimpl<C> GetHue for C where
C: NonRadialSpace,
impl<C> GetHue for C where
C: NonRadialSpace,
sourceimpl<C> GetRadialSaturation for C where
C: Clone + Copy + FromColor<HslColor> + IntoColor<HslColor> + FromColor<HsvColor> + IntoColor<HsvColor>,
impl<C> GetRadialSaturation for C where
C: Clone + Copy + FromColor<HslColor> + IntoColor<HslColor> + FromColor<HsvColor> + IntoColor<HsvColor>,
sourcefn get_hsl_saturation(self) -> f32
fn get_hsl_saturation(self) -> f32
Retrieve hsl saturation
sourcefn get_hsv_saturation(self) -> f32
fn get_hsv_saturation(self) -> f32
Set hsv saturation
sourceimpl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
sourcefn into_color(self) -> To
fn into_color(self) -> To
Convert into color
sourceimpl<C> Invert for C where
C: ColorTransition,
impl<C> Invert for C where
C: ColorTransition,
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<C> Saturate for C where
C: Clone + GetRadialSaturation + SetRadialSaturation,
impl<C> Saturate for C where
C: Clone + GetRadialSaturation + SetRadialSaturation,
sourceimpl<C> SetHue for C where
C: NonRadialSpace,
impl<C> SetHue for C where
C: NonRadialSpace,
impl<T> SetParameter for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
Sets value
as a parameter of self
.
sourceimpl<C> SetRadialSaturation for C where
C: Clone + Copy + FromColor<HslColor> + IntoColor<HslColor> + FromColor<HsvColor> + IntoColor<HsvColor>,
impl<C> SetRadialSaturation for C where
C: Clone + Copy + FromColor<HslColor> + IntoColor<HslColor> + FromColor<HsvColor> + IntoColor<HsvColor>,
sourcefn set_hsl_saturation(&mut self, saturation: f32) -> C
fn set_hsl_saturation(&mut self, saturation: f32) -> C
Retrieve hsl saturation
sourcefn set_hsv_saturation(&mut self, saturation: f32) -> C
fn set_hsv_saturation(&mut self, saturation: f32) -> C
Set hsv saturation
sourceimpl<C> ToHexString for C where
C: Into<RgbColor> + Clone,
impl<C> ToHexString for C where
C: Into<RgbColor> + Clone,
sourcefn to_hex_string(&self) -> String
fn to_hex_string(&self) -> String
Represents a color as a hexadecimal string