Struct RGBA
#[repr(C)]pub struct RGBA {
pub red: u8,
pub green: u8,
pub blue: u8,
pub alpha: u8,
}
Expand description
A color with red, green, blue, and alpha components, in a byte each.
Fields§
§red: u8
The red component.
green: u8
The green component.
blue: u8
The blue component.
alpha: u8
The alpha component.
Implementations§
§impl RGBA
impl RGBA
pub const BLACK: RGBA = _
pub const SILVER: RGBA = _
pub const GRAY: RGBA = _
pub const WHITE: RGBA = _
pub const MAROON: RGBA = _
pub const RED: RGBA = _
pub const PURPLE: RGBA = _
pub const FUCHSIA: RGBA = _
pub const GREEN: RGBA = _
pub const LIME: RGBA = _
pub const OLIVE: RGBA = _
pub const YELLOW: RGBA = _
pub const NAVY: RGBA = _
pub const BLUE: RGBA = _
pub const TEAL: RGBA = _
pub const AQUA: RGBA = _
pub const ALICEBLUE: RGBA = _
pub const ANTIQUEWHITE: RGBA = _
pub const AQUAMARINE: RGBA = _
pub const AZURE: RGBA = _
pub const BEIGE: RGBA = _
pub const BISQUE: RGBA = _
pub const BLANCHEDALMOND: RGBA = _
pub const BLUEVIOLET: RGBA = _
pub const BROWN: RGBA = _
pub const BURLYWOOD: RGBA = _
pub const CADETBLUE: RGBA = _
pub const CHARTREUSE: RGBA = _
pub const CHOCOLATE: RGBA = _
pub const CORAL: RGBA = _
pub const CORNFLOWERBLUE: RGBA = _
pub const CORNSILK: RGBA = _
pub const CRIMSON: RGBA = _
pub const CYAN: RGBA = _
pub const DARKBLUE: RGBA = _
pub const DARKCYAN: RGBA = _
pub const DARKGOLDENROD: RGBA = _
pub const DARKGRAY: RGBA = _
pub const DARKGREEN: RGBA = _
pub const DARKGREY: RGBA = _
pub const DARKKHAKI: RGBA = _
pub const DARKMAGENTA: RGBA = _
pub const DARKOLIVEGREEN: RGBA = _
pub const DARKORANGE: RGBA = _
pub const DARKORCHID: RGBA = _
pub const DARKRED: RGBA = _
pub const DARKSALMON: RGBA = _
pub const DARKSEAGREEN: RGBA = _
pub const DARKSLATEBLUE: RGBA = _
pub const DARKSLATEGRAY: RGBA = _
pub const DARKSLATEGREY: RGBA = _
pub const DARKTURQUOISE: RGBA = _
pub const DARKVIOLET: RGBA = _
pub const DEEPPINK: RGBA = _
pub const DEEPSKYBLUE: RGBA = _
pub const DIMGRAY: RGBA = _
pub const DIMGREY: RGBA = _
pub const DODGERBLUE: RGBA = _
pub const FIREBRICK: RGBA = _
pub const FLORALWHITE: RGBA = _
pub const FORESTGREEN: RGBA = _
pub const GAINSBORO: RGBA = _
pub const GHOSTWHITE: RGBA = _
pub const GOLD: RGBA = _
pub const GOLDENROD: RGBA = _
pub const GREENYELLOW: RGBA = _
pub const GREY: RGBA = _
pub const HONEYDEW: RGBA = _
pub const HOTPINK: RGBA = _
pub const INDIANRED: RGBA = _
pub const INDIGO: RGBA = _
pub const IVORY: RGBA = _
pub const KHAKI: RGBA = _
pub const LAVENDER: RGBA = _
pub const LAVENDERBLUSH: RGBA = _
pub const LAWNGREEN: RGBA = _
pub const LEMONCHIFFON: RGBA = _
pub const LIGHTBLUE: RGBA = _
pub const LIGHTCORAL: RGBA = _
pub const LIGHTCYAN: RGBA = _
pub const LIGHTGOLDENRODYELLOW: RGBA = _
pub const LIGHTGRAY: RGBA = _
pub const LIGHTGREEN: RGBA = _
pub const LIGHTGREY: RGBA = _
pub const LIGHTPINK: RGBA = _
pub const LIGHTSALMON: RGBA = _
pub const LIGHTSEAGREEN: RGBA = _
pub const LIGHTSKYBLUE: RGBA = _
pub const LIGHTSLATEGRAY: RGBA = _
pub const LIGHTSLATEGREY: RGBA = _
pub const LIGHTSTEELBLUE: RGBA = _
pub const LIGHTYELLOW: RGBA = _
pub const LIMEGREEN: RGBA = _
pub const LINEN: RGBA = _
pub const MAGENTA: RGBA = _
pub const MEDIUMAQUAMARINE: RGBA = _
pub const MEDIUMBLUE: RGBA = _
pub const MEDIUMORCHID: RGBA = _
pub const MEDIUMPURPLE: RGBA = _
pub const MEDIUMSEAGREEN: RGBA = _
pub const MEDIUMSLATEBLUE: RGBA = _
pub const MEDIUMSPRINGGREEN: RGBA = _
pub const MEDIUMTURQUOISE: RGBA = _
pub const MEDIUMVIOLETRED: RGBA = _
pub const MIDNIGHTBLUE: RGBA = _
pub const MINTCREAM: RGBA = _
pub const MISTYROSE: RGBA = _
pub const MOCCASIN: RGBA = _
pub const NAVAJOWHITE: RGBA = _
pub const OLDLACE: RGBA = _
pub const OLIVEDRAB: RGBA = _
pub const ORANGE: RGBA = _
pub const ORANGERED: RGBA = _
pub const ORCHID: RGBA = _
pub const PALEGOLDENROD: RGBA = _
pub const PALEGREEN: RGBA = _
pub const PALETURQUOISE: RGBA = _
pub const PALEVIOLETRED: RGBA = _
pub const PAPAYAWHIP: RGBA = _
pub const PEACHPUFF: RGBA = _
pub const PERU: RGBA = _
pub const PINK: RGBA = _
pub const PLUM: RGBA = _
pub const POWDERBLUE: RGBA = _
pub const REBECCAPURPLE: RGBA = _
pub const ROSYBROWN: RGBA = _
pub const ROYALBLUE: RGBA = _
pub const SADDLEBROWN: RGBA = _
pub const SALMON: RGBA = _
pub const SANDYBROWN: RGBA = _
pub const SEAGREEN: RGBA = _
pub const SEASHELL: RGBA = _
pub const SIENNA: RGBA = _
pub const SKYBLUE: RGBA = _
pub const SLATEBLUE: RGBA = _
pub const SLATEGRAY: RGBA = _
pub const SLATEGREY: RGBA = _
pub const SNOW: RGBA = _
pub const SPRINGGREEN: RGBA = _
pub const STEELBLUE: RGBA = _
pub const TAN: RGBA = _
pub const THISTLE: RGBA = _
pub const TOMATO: RGBA = _
pub const TURQUOISE: RGBA = _
pub const VIOLET: RGBA = _
pub const WHEAT: RGBA = _
pub const WHITESMOKE: RGBA = _
pub const YELLOWGREEN: RGBA = _
pub const TRANSPARENT: RGBA = _
pub const fn rgba(red: u8, green: u8, blue: u8, alpha: u8) -> RGBA
pub const fn rgba(red: u8, green: u8, blue: u8, alpha: u8) -> RGBA
Creates a new RGBA from RGBA values
pub fn r(&self) -> u8
pub fn g(&self) -> u8
pub fn b(&self) -> u8
pub fn a(&self) -> u8
Trait Implementations§
§impl ResGet<RGBA> for RGBA
impl ResGet<RGBA> for RGBA
fn get_ref<'a>(&'a self, _: &'a impl DataContext) -> Option<LensValue<'a, RGBA>>
fn get(&self, _: &impl DataContext) -> RGBA
impl Copy for RGBA
impl StructuralPartialEq for RGBA
Auto Trait Implementations§
impl Freeze for RGBA
impl RefUnwindSafe for RGBA
impl Send for RGBA
impl Sync for RGBA
impl Unpin for RGBA
impl UnwindSafe for RGBA
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.