#[repr(C)]pub struct Color32(_);
Expand description
Implementations
sourceimpl Color32
impl Color32
pub const TRANSPARENT: Color32
pub const BLACK: Color32
pub const DARK_GRAY: Color32
pub const GRAY: Color32
pub const LIGHT_GRAY: Color32
pub const WHITE: Color32
pub const BROWN: Color32
pub const DARK_RED: Color32
pub const RED: Color32
pub const LIGHT_RED: Color32
pub const YELLOW: Color32
pub const LIGHT_YELLOW: Color32
pub const KHAKI: Color32
pub const DARK_GREEN: Color32
pub const GREEN: Color32
pub const LIGHT_GREEN: Color32
pub const DARK_BLUE: Color32
pub const BLUE: Color32
pub const LIGHT_BLUE: Color32
pub const GOLD: Color32
pub const DEBUG_COLOR: Color32
sourcepub const TEMPORARY_COLOR: Color32
pub const TEMPORARY_COLOR: Color32
An ugly color that is planned to be replaced before making it to the screen.
pub const fn from_rgb(r: u8, g: u8, b: u8) -> Color32
pub const fn from_rgb_additive(r: u8, g: u8, b: u8) -> Color32
sourcepub const fn from_rgba_premultiplied(r: u8, g: u8, b: u8, a: u8) -> Color32
pub const fn from_rgba_premultiplied(r: u8, g: u8, b: u8, a: u8) -> Color32
From sRGBA
with premultiplied alpha.
sourcepub fn from_rgba_unmultiplied(r: u8, g: u8, b: u8, a: u8) -> Color32
pub fn from_rgba_unmultiplied(r: u8, g: u8, b: u8, a: u8) -> Color32
From sRGBA
WITHOUT premultiplied alpha.
pub const fn from_gray(l: u8) -> Color32
pub const fn from_black_alpha(a: u8) -> Color32
pub fn from_white_alpha(a: u8) -> Color32
pub const fn from_additive_luminance(l: u8) -> Color32
pub fn is_opaque(&self) -> bool
pub fn r(&self) -> u8
pub fn g(&self) -> u8
pub fn b(&self) -> u8
pub fn a(&self) -> u8
pub fn to_srgba_unmultiplied(&self) -> [u8; 4]
sourcepub fn linear_multiply(self, factor: f32) -> Color32
pub fn linear_multiply(self, factor: f32) -> Color32
Multiply with 0.5 to make color half as opaque.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Color32
impl<'de> Deserialize<'de> for Color32
sourcepub fn deserialize<__D>(
__deserializer: __D
) -> Result<Color32, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<Color32, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Serialize for Color32
impl Serialize for Color32
sourcepub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for Color32
impl Eq for Color32
impl Pod for Color32
impl StructuralEq for Color32
impl StructuralPartialEq for Color32
Auto Trait Implementations
impl RefUnwindSafe for Color32
impl Send for Color32
impl Sync for Color32
impl Unpin for Color32
impl UnwindSafe for Color32
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CallHasher for T where
T: Hash + ?Sized,
impl<T> CallHasher for T where
T: Hash + ?Sized,
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more