Struct lightningcss::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.
Trait Implementations§
source§impl Clone for SRGBLinear
impl Clone for SRGBLinear
source§fn clone(&self) -> SRGBLinear
fn clone(&self) -> SRGBLinear
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl ColorGamut for SRGBLinear
impl ColorGamut for SRGBLinear
source§impl ColorSpace for SRGBLinear
impl ColorSpace for SRGBLinear
source§fn channels(&self) -> (&'static str, &'static str, &'static str)
fn channels(&self) -> (&'static str, &'static str, &'static str)
Returns the channel names for this color space.
source§fn types(&self) -> (ChannelType, ChannelType, ChannelType)
fn types(&self) -> (ChannelType, ChannelType, ChannelType)
Returns the channel types for this color space.
source§fn resolve_missing(&self) -> Self
fn resolve_missing(&self) -> Self
Resolves missing color components (e.g.
none
keywords) in the color.source§impl Debug for SRGBLinear
impl Debug for SRGBLinear
source§impl From<&CssColor> for SRGBLinear
impl From<&CssColor> for SRGBLinear
source§fn from(color: &CssColor) -> SRGBLinear
fn from(color: &CssColor) -> SRGBLinear
Converts to this type from the input type.
source§impl From<A98> for SRGBLinear
impl From<A98> for SRGBLinear
source§fn from(t: A98) -> SRGBLinear
fn from(t: A98) -> SRGBLinear
Converts to this type from the input type.
source§impl From<CssColor> for SRGBLinear
impl From<CssColor> for SRGBLinear
source§fn from(color: CssColor) -> SRGBLinear
fn from(color: CssColor) -> SRGBLinear
Converts to this type from the input type.
source§impl From<FloatColor> for SRGBLinear
impl From<FloatColor> for SRGBLinear
source§fn from(color: FloatColor) -> SRGBLinear
fn from(color: FloatColor) -> SRGBLinear
Converts to this type from the input type.
source§impl From<HSL> for SRGBLinear
impl From<HSL> for SRGBLinear
source§fn from(t: HSL) -> SRGBLinear
fn from(t: HSL) -> SRGBLinear
Converts to this type from the input type.
source§impl From<HWB> for SRGBLinear
impl From<HWB> for SRGBLinear
source§fn from(t: HWB) -> SRGBLinear
fn from(t: HWB) -> SRGBLinear
Converts to this type from the input type.
source§impl From<LAB> for SRGBLinear
impl From<LAB> for SRGBLinear
source§fn from(t: LAB) -> SRGBLinear
fn from(t: LAB) -> SRGBLinear
Converts to this type from the input type.
source§impl From<LABColor> for SRGBLinear
impl From<LABColor> for SRGBLinear
source§fn from(color: LABColor) -> SRGBLinear
fn from(color: LABColor) -> SRGBLinear
Converts to this type from the input type.
source§impl From<LCH> for SRGBLinear
impl From<LCH> for SRGBLinear
source§fn from(t: LCH) -> SRGBLinear
fn from(t: LCH) -> SRGBLinear
Converts to this type from the input type.
source§impl From<OKLAB> for SRGBLinear
impl From<OKLAB> for SRGBLinear
source§fn from(t: OKLAB) -> SRGBLinear
fn from(t: OKLAB) -> SRGBLinear
Converts to this type from the input type.
source§impl From<OKLCH> for SRGBLinear
impl From<OKLCH> for SRGBLinear
source§fn from(t: OKLCH) -> SRGBLinear
fn from(t: OKLCH) -> SRGBLinear
Converts to this type from the input type.
source§impl From<P3> for SRGBLinear
impl From<P3> for SRGBLinear
source§fn from(t: P3) -> SRGBLinear
fn from(t: P3) -> SRGBLinear
Converts to this type from the input type.
source§impl From<PredefinedColor> for SRGBLinear
impl From<PredefinedColor> for SRGBLinear
source§fn from(color: PredefinedColor) -> SRGBLinear
fn from(color: PredefinedColor) -> SRGBLinear
Converts to this type from the input type.
source§impl From<ProPhoto> for SRGBLinear
impl From<ProPhoto> for SRGBLinear
source§fn from(t: ProPhoto) -> SRGBLinear
fn from(t: ProPhoto) -> SRGBLinear
Converts to this type from the input type.
source§impl From<RGBA> for SRGBLinear
impl From<RGBA> for SRGBLinear
source§fn from(t: RGBA) -> SRGBLinear
fn from(t: RGBA) -> SRGBLinear
Converts to this type from the input type.
source§impl From<Rec2020> for SRGBLinear
impl From<Rec2020> for SRGBLinear
source§fn from(t: Rec2020) -> SRGBLinear
fn from(t: Rec2020) -> SRGBLinear
Converts to this type from the input type.
source§impl From<SRGB> for SRGBLinear
impl From<SRGB> for SRGBLinear
source§fn from(rgb: SRGB) -> SRGBLinear
fn from(rgb: SRGB) -> SRGBLinear
Converts to this type from the input type.
source§impl From<SRGBLinear> for A98
impl From<SRGBLinear> for A98
source§fn from(t: SRGBLinear) -> A98
fn from(t: SRGBLinear) -> A98
Converts to this type from the input type.
source§impl From<SRGBLinear> for CssColor
impl From<SRGBLinear> for CssColor
source§fn from(color: SRGBLinear) -> CssColor
fn from(color: SRGBLinear) -> CssColor
Converts to this type from the input type.
source§impl From<SRGBLinear> for HSL
impl From<SRGBLinear> for HSL
source§fn from(t: SRGBLinear) -> HSL
fn from(t: SRGBLinear) -> HSL
Converts to this type from the input type.
source§impl From<SRGBLinear> for HWB
impl From<SRGBLinear> for HWB
source§fn from(t: SRGBLinear) -> HWB
fn from(t: SRGBLinear) -> HWB
Converts to this type from the input type.
source§impl From<SRGBLinear> for LAB
impl From<SRGBLinear> for LAB
source§fn from(t: SRGBLinear) -> LAB
fn from(t: SRGBLinear) -> LAB
Converts to this type from the input type.
source§impl From<SRGBLinear> for LCH
impl From<SRGBLinear> for LCH
source§fn from(t: SRGBLinear) -> LCH
fn from(t: SRGBLinear) -> LCH
Converts to this type from the input type.
source§impl From<SRGBLinear> for OKLAB
impl From<SRGBLinear> for OKLAB
source§fn from(t: SRGBLinear) -> OKLAB
fn from(t: SRGBLinear) -> OKLAB
Converts to this type from the input type.
source§impl From<SRGBLinear> for OKLCH
impl From<SRGBLinear> for OKLCH
source§fn from(t: SRGBLinear) -> OKLCH
fn from(t: SRGBLinear) -> OKLCH
Converts to this type from the input type.
source§impl From<SRGBLinear> for P3
impl From<SRGBLinear> for P3
source§fn from(t: SRGBLinear) -> P3
fn from(t: SRGBLinear) -> P3
Converts to this type from the input type.
source§impl From<SRGBLinear> for PredefinedColor
impl From<SRGBLinear> for PredefinedColor
source§fn from(color: SRGBLinear) -> PredefinedColor
fn from(color: SRGBLinear) -> PredefinedColor
Converts to this type from the input type.
source§impl From<SRGBLinear> for ProPhoto
impl From<SRGBLinear> for ProPhoto
source§fn from(t: SRGBLinear) -> ProPhoto
fn from(t: SRGBLinear) -> ProPhoto
Converts to this type from the input type.
source§impl From<SRGBLinear> for RGBA
impl From<SRGBLinear> for RGBA
source§fn from(t: SRGBLinear) -> RGBA
fn from(t: SRGBLinear) -> RGBA
Converts to this type from the input type.
source§impl From<SRGBLinear> for Rec2020
impl From<SRGBLinear> for Rec2020
source§fn from(t: SRGBLinear) -> Rec2020
fn from(t: SRGBLinear) -> Rec2020
Converts to this type from the input type.
source§impl From<SRGBLinear> for SRGB
impl From<SRGBLinear> for SRGB
source§fn from(rgb: SRGBLinear) -> SRGB
fn from(rgb: SRGBLinear) -> SRGB
Converts to this type from the input type.
source§impl From<SRGBLinear> for XYZd50
impl From<SRGBLinear> for XYZd50
source§fn from(t: SRGBLinear) -> XYZd50
fn from(t: SRGBLinear) -> XYZd50
Converts to this type from the input type.
source§impl From<SRGBLinear> for XYZd65
impl From<SRGBLinear> for XYZd65
source§fn from(rgb: SRGBLinear) -> XYZd65
fn from(rgb: SRGBLinear) -> XYZd65
Converts to this type from the input type.
source§impl From<XYZd50> for SRGBLinear
impl From<XYZd50> for SRGBLinear
source§fn from(t: XYZd50) -> SRGBLinear
fn from(t: XYZd50) -> SRGBLinear
Converts to this type from the input type.
source§impl From<XYZd65> for SRGBLinear
impl From<XYZd65> for SRGBLinear
source§fn from(xyz: XYZd65) -> SRGBLinear
fn from(xyz: XYZd65) -> SRGBLinear
Converts to this type from the input type.
source§impl Interpolate for SRGBLinear
impl Interpolate for SRGBLinear
source§fn premultiply(&mut self)
fn premultiply(&mut self)
Premultiplies the color by its alpha value.
source§fn unpremultiply(&mut self, alpha_multiplier: f32)
fn unpremultiply(&mut self, alpha_multiplier: f32)
Un-premultiplies the color by the given alpha multiplier.
source§fn 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.
source§fn 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.
source§fn adjust_powerless_components(&mut self)
fn adjust_powerless_components(&mut self)
Adjusts components that are powerless to be NaN.
source§fn 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.
source§impl PartialEq<SRGBLinear> for SRGBLinear
impl PartialEq<SRGBLinear> for SRGBLinear
source§fn eq(&self, other: &SRGBLinear) -> bool
fn eq(&self, other: &SRGBLinear) -> bool
source§impl<'i, __T: Visit<'i, __T, __V>, __V: Visitor<'i, __T>> Visit<'i, __T, __V> for SRGBLinear
impl<'i, __T: Visit<'i, __T, __V>, __V: Visitor<'i, __T>> Visit<'i, __T, __V> for SRGBLinear
source§const CHILD_TYPES: VisitTypes = _
const CHILD_TYPES: VisitTypes = _
The types of values contained within this value and its children.
This is used to skip branches that don’t have any values requested
by the Visitor. Read more
source§fn visit_children(&mut self, visitor: &mut __V)
fn visit_children(&mut self, visitor: &mut __V)
Visit the children of this value.
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.
§impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
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