pub type RgbaPreF64 = Rgba<f64, false, true>;
Available on crate feature
color
only.Expand description
RGB+A color with 64-bit float components (sRGB gamma space, premultiplied alpha).
Aliased Type§
#[repr(C)]pub struct RgbaPreF64 {
pub c: [f64; 4],
}
Fields§
§c: [f64; 4]
Color channels in order: [red, green, blue, alpha].
- Red/Green/Blue: Gamma-encoded luminosity (0..=255).
- Alpha: Linear opacity (0 = transparent, 255 = opaque).
Trait Implementations§
Source§impl Color for RgbaPreF64
impl Color for RgbaPreF64
Source§const COLOR_BITS: usize = 64usize
const COLOR_BITS: usize = 64usize
The bit depth of each color component (e.g.,
8
for u8
, 32
for f32
).Source§const COLOR_COUNT: usize = 4usize
const COLOR_COUNT: usize = 4usize
The number of color components (channels) in the representation. Read more
Source§const COLOR_HAS_ALPHA: bool = true
const COLOR_HAS_ALPHA: bool = true
Whether the color has an alpha component are integer types (e.g.,
u8
, u16
).Source§const COLOR_IS_LINEAR: bool = false
const COLOR_IS_LINEAR: bool = false
Whether the color space is linear (as opposed to non-linear, e.g., sRGB). Read more
Source§const COLOR_IS_INT: bool = false
const COLOR_IS_INT: bool = false
Source§const COLOR_IS_PREMUL: bool = true
const COLOR_IS_PREMUL: bool = true
Whether the color uses premultiplied alpha (vs. straight/unassociated alpha). Read more
Source§fn color_green(&self) -> Self::Component
fn color_green(&self) -> Self::Component
Get the green component.
Source§fn color_blue(&self) -> Self::Component
fn color_blue(&self) -> Self::Component
Get the blue component.
Source§fn color_alpha(&self) -> Self::Component
fn color_alpha(&self) -> Self::Component
Get the alpha component. Read more
Source§fn color_components_write(&self, b: &mut [f64]) -> Result<(), NotEnoughSpace> ⓘ
fn color_components_write(&self, b: &mut [f64]) -> Result<(), NotEnoughSpace> ⓘ
Writes the color components to a pre-allocated
buffer
. Read moreSource§fn color_bits(&self) -> usize
fn color_bits(&self) -> usize
Returns the bit depth of each color component (e.g., 8 for
u8
, 32 for f32
).Source§fn color_count(&self) -> usize
fn color_count(&self) -> usize
Returns the number of color components (channels).
Source§fn color_has_alpha(&self) -> bool
fn color_has_alpha(&self) -> bool
Returns
true
if the color has an alpha component.Source§fn color_is_int(&self) -> bool
fn color_is_int(&self) -> bool
Returns
true
if the color uses integer components (e.g., u8
, u16
).Source§fn color_is_linear(&self) -> bool
fn color_is_linear(&self) -> bool
Returns
true
if the color is in a linear space (not gamma-encoded like sRGB).Source§fn color_is_premul(&self) -> bool
fn color_is_premul(&self) -> bool
Returns
true
if the color uses premultiplied alpha.