Struct parcel_css::values::color::SRGBLinear
source · [−]Expand description
A color in the sRGB-linear
color space.
Fields
r: f32
The red component.
g: f32
The green component.
b: f32
The blue component.
alpha: f32
The alpha component.
Implementations
sourceimpl SRGBLinear
impl SRGBLinear
Trait Implementations
sourceimpl Clone for SRGBLinear
impl Clone for SRGBLinear
sourcefn clone(&self) -> SRGBLinear
fn clone(&self) -> SRGBLinear
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl ColorGamut for SRGBLinear
impl ColorGamut for SRGBLinear
sourceimpl Debug for SRGBLinear
impl Debug for SRGBLinear
sourceimpl From<&CssColor> for SRGBLinear
impl From<&CssColor> for SRGBLinear
sourcefn from(color: &CssColor) -> SRGBLinear
fn from(color: &CssColor) -> SRGBLinear
Converts to this type from the input type.
sourceimpl From<A98> for SRGBLinear
impl From<A98> for SRGBLinear
sourcefn from(t: A98) -> SRGBLinear
fn from(t: A98) -> SRGBLinear
Converts to this type from the input type.
sourceimpl From<FloatColor> for SRGBLinear
impl From<FloatColor> for SRGBLinear
sourcefn from(color: FloatColor) -> SRGBLinear
fn from(color: FloatColor) -> SRGBLinear
Converts to this type from the input type.
sourceimpl From<HSL> for SRGBLinear
impl From<HSL> for SRGBLinear
sourcefn from(t: HSL) -> SRGBLinear
fn from(t: HSL) -> SRGBLinear
Converts to this type from the input type.
sourceimpl From<HWB> for SRGBLinear
impl From<HWB> for SRGBLinear
sourcefn from(t: HWB) -> SRGBLinear
fn from(t: HWB) -> SRGBLinear
Converts to this type from the input type.
sourceimpl From<LAB> for SRGBLinear
impl From<LAB> for SRGBLinear
sourcefn from(t: LAB) -> SRGBLinear
fn from(t: LAB) -> SRGBLinear
Converts to this type from the input type.
sourceimpl From<LABColor> for SRGBLinear
impl From<LABColor> for SRGBLinear
sourcefn from(color: LABColor) -> SRGBLinear
fn from(color: LABColor) -> SRGBLinear
Converts to this type from the input type.
sourceimpl From<LCH> for SRGBLinear
impl From<LCH> for SRGBLinear
sourcefn from(t: LCH) -> SRGBLinear
fn from(t: LCH) -> SRGBLinear
Converts to this type from the input type.
sourceimpl From<OKLAB> for SRGBLinear
impl From<OKLAB> for SRGBLinear
sourcefn from(t: OKLAB) -> SRGBLinear
fn from(t: OKLAB) -> SRGBLinear
Converts to this type from the input type.
sourceimpl From<OKLCH> for SRGBLinear
impl From<OKLCH> for SRGBLinear
sourcefn from(t: OKLCH) -> SRGBLinear
fn from(t: OKLCH) -> SRGBLinear
Converts to this type from the input type.
sourceimpl From<P3> for SRGBLinear
impl From<P3> for SRGBLinear
sourcefn from(t: P3) -> SRGBLinear
fn from(t: P3) -> SRGBLinear
Converts to this type from the input type.
sourceimpl From<PredefinedColor> for SRGBLinear
impl From<PredefinedColor> for SRGBLinear
sourcefn from(color: PredefinedColor) -> SRGBLinear
fn from(color: PredefinedColor) -> SRGBLinear
Converts to this type from the input type.
sourceimpl From<ProPhoto> for SRGBLinear
impl From<ProPhoto> for SRGBLinear
sourcefn from(t: ProPhoto) -> SRGBLinear
fn from(t: ProPhoto) -> SRGBLinear
Converts to this type from the input type.
sourceimpl From<RGBA> for SRGBLinear
impl From<RGBA> for SRGBLinear
sourcefn from(t: RGBA) -> SRGBLinear
fn from(t: RGBA) -> SRGBLinear
Converts to this type from the input type.
sourceimpl From<Rec2020> for SRGBLinear
impl From<Rec2020> for SRGBLinear
sourcefn from(t: Rec2020) -> SRGBLinear
fn from(t: Rec2020) -> SRGBLinear
Converts to this type from the input type.
sourceimpl From<SRGB> for SRGBLinear
impl From<SRGB> for SRGBLinear
sourcefn from(rgb: SRGB) -> SRGBLinear
fn from(rgb: SRGB) -> SRGBLinear
Converts to this type from the input type.
sourceimpl From<SRGBLinear> for A98
impl From<SRGBLinear> for A98
sourcefn from(t: SRGBLinear) -> A98
fn from(t: SRGBLinear) -> A98
Converts to this type from the input type.
sourceimpl From<SRGBLinear> for CssColor
impl From<SRGBLinear> for CssColor
sourcefn from(color: SRGBLinear) -> CssColor
fn from(color: SRGBLinear) -> CssColor
Converts to this type from the input type.
sourceimpl From<SRGBLinear> for HSL
impl From<SRGBLinear> for HSL
sourcefn from(t: SRGBLinear) -> HSL
fn from(t: SRGBLinear) -> HSL
Converts to this type from the input type.
sourceimpl From<SRGBLinear> for HWB
impl From<SRGBLinear> for HWB
sourcefn from(t: SRGBLinear) -> HWB
fn from(t: SRGBLinear) -> HWB
Converts to this type from the input type.
sourceimpl From<SRGBLinear> for LAB
impl From<SRGBLinear> for LAB
sourcefn from(t: SRGBLinear) -> LAB
fn from(t: SRGBLinear) -> LAB
Converts to this type from the input type.
sourceimpl From<SRGBLinear> for LCH
impl From<SRGBLinear> for LCH
sourcefn from(t: SRGBLinear) -> LCH
fn from(t: SRGBLinear) -> LCH
Converts to this type from the input type.
sourceimpl From<SRGBLinear> for OKLAB
impl From<SRGBLinear> for OKLAB
sourcefn from(t: SRGBLinear) -> OKLAB
fn from(t: SRGBLinear) -> OKLAB
Converts to this type from the input type.
sourceimpl From<SRGBLinear> for OKLCH
impl From<SRGBLinear> for OKLCH
sourcefn from(t: SRGBLinear) -> OKLCH
fn from(t: SRGBLinear) -> OKLCH
Converts to this type from the input type.
sourceimpl From<SRGBLinear> for P3
impl From<SRGBLinear> for P3
sourcefn from(t: SRGBLinear) -> P3
fn from(t: SRGBLinear) -> P3
Converts to this type from the input type.
sourceimpl From<SRGBLinear> for PredefinedColor
impl From<SRGBLinear> for PredefinedColor
sourcefn from(color: SRGBLinear) -> PredefinedColor
fn from(color: SRGBLinear) -> PredefinedColor
Converts to this type from the input type.
sourceimpl From<SRGBLinear> for ProPhoto
impl From<SRGBLinear> for ProPhoto
sourcefn from(t: SRGBLinear) -> ProPhoto
fn from(t: SRGBLinear) -> ProPhoto
Converts to this type from the input type.
sourceimpl From<SRGBLinear> for RGBA
impl From<SRGBLinear> for RGBA
sourcefn from(t: SRGBLinear) -> RGBA
fn from(t: SRGBLinear) -> RGBA
Converts to this type from the input type.
sourceimpl From<SRGBLinear> for Rec2020
impl From<SRGBLinear> for Rec2020
sourcefn from(t: SRGBLinear) -> Rec2020
fn from(t: SRGBLinear) -> Rec2020
Converts to this type from the input type.
sourceimpl From<SRGBLinear> for SRGB
impl From<SRGBLinear> for SRGB
sourcefn from(rgb: SRGBLinear) -> SRGB
fn from(rgb: SRGBLinear) -> SRGB
Converts to this type from the input type.
sourceimpl From<SRGBLinear> for XYZd50
impl From<SRGBLinear> for XYZd50
sourcefn from(t: SRGBLinear) -> XYZd50
fn from(t: SRGBLinear) -> XYZd50
Converts to this type from the input type.
sourceimpl From<SRGBLinear> for XYZd65
impl From<SRGBLinear> for XYZd65
sourcefn from(rgb: SRGBLinear) -> XYZd65
fn from(rgb: SRGBLinear) -> XYZd65
Converts to this type from the input type.
sourceimpl From<XYZd50> for SRGBLinear
impl From<XYZd50> for SRGBLinear
sourcefn from(t: XYZd50) -> SRGBLinear
fn from(t: XYZd50) -> SRGBLinear
Converts to this type from the input type.
sourceimpl From<XYZd65> for SRGBLinear
impl From<XYZd65> for SRGBLinear
sourcefn from(xyz: XYZd65) -> SRGBLinear
fn from(xyz: XYZd65) -> SRGBLinear
Converts to this type from the input type.
sourceimpl Interpolate for SRGBLinear
impl Interpolate for SRGBLinear
sourcefn premultiply(&mut self)
fn premultiply(&mut self)
Premultiplies the color by its alpha value.
sourcefn unpremultiply(&mut self, alpha_multiplier: f32)
fn unpremultiply(&mut self, alpha_multiplier: f32)
Un-premultiplies the color by the given alpha multiplier.
sourcefn fill_missing_components(&mut self, other: &Self)
fn fill_missing_components(&mut self, other: &Self)
Fills missing components (represented as NaN) to match the other color to interpolate with.
sourcefn interpolate(&self, p1: f32, other: &Self, p2: f32) -> Self
fn interpolate(&self, p1: f32, other: &Self, p2: f32) -> Self
Interpolates the color with another using the given amounts of each.
sourcefn adjust_powerless_components(&mut self)
fn adjust_powerless_components(&mut self)
Adjusts components that are powerless to be NaN.
sourcefn adjust_hue(&mut self, _: &mut Self, _: HueInterpolationMethod)
fn adjust_hue(&mut self, _: &mut Self, _: HueInterpolationMethod)
Adjusts the color hue according to the given hue interpolation method.
sourceimpl PartialEq<SRGBLinear> for SRGBLinear
impl PartialEq<SRGBLinear> for SRGBLinear
sourcefn eq(&self, other: &SRGBLinear) -> bool
fn eq(&self, other: &SRGBLinear) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
impl Copy for SRGBLinear
impl StructuralPartialEq for SRGBLinear
Auto Trait Implementations
impl RefUnwindSafe for SRGBLinear
impl Send for SRGBLinear
impl Sync for SRGBLinear
impl Unpin for SRGBLinear
impl UnwindSafe for SRGBLinear
Blanket Implementations
impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
impl<F, W, T, D> Deserialize<With<T, W>, D> for F where
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for F where
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer