pub struct Color { /* private fields */ }Implementations§
Source§impl Color
impl Color
pub const COLOR_BLACK: ARGB8
pub const COLOR_BLACK_STR: &'static str = "FF000000"
pub const COLOR_BLUE: ARGB8
pub const COLOR_BLUE_STR: &'static str = "FF0000FF"
pub const COLOR_DARKBLUE: ARGB8
pub const COLOR_DARKBLUE_STR: &'static str = "FF000080"
pub const COLOR_DARKGREEN: ARGB8
pub const COLOR_DARKGREEN_STR: &'static str = "FF008000"
pub const COLOR_DARKRED: ARGB8
pub const COLOR_DARKRED_STR: &'static str = "FF800000"
pub const COLOR_DARKYELLOW: ARGB8
pub const COLOR_DARKYELLOW_STR: &'static str = "FF808000"
pub const COLOR_GREEN: ARGB8
pub const COLOR_GREEN_STR: &'static str = "FF00FF00"
pub const COLOR_RED: ARGB8
pub const COLOR_RED_STR: &'static str = "FFFF0000"
pub const COLOR_WHITE: ARGB8
pub const COLOR_WHITE_STR: &'static str = "FFFFFFFF"
pub const COLOR_YELLOW: ARGB8
pub const COLOR_YELLOW_STR: &'static str = "FFFFFF00"
pub const NAMED_COLORS: [&'static str; 8]
Sourcepub fn hex_to_argb8(hex: &str) -> Option<ARGB8>
pub fn hex_to_argb8(hex: &str) -> Option<ARGB8>
Convert hex string to ARGB8
Sourcepub fn argb8_to_hex(argb: ARGB8) -> String
pub fn argb8_to_hex(argb: ARGB8) -> String
Convert ARGB8 to hex string
pub fn argb_str(&self) -> String
pub fn get_argb_str(&self) -> String
👎Deprecated since 3.0.0:
Use argb_str()
pub fn argb(&self) -> ARGB8
pub fn get_argb(&self) -> ARGB8
👎Deprecated since 3.0.0:
Use argb()
Sourcepub fn argb_with_theme(&self, theme: &Theme) -> Cow<'static, str>
pub fn argb_with_theme(&self, theme: &Theme) -> Cow<'static, str>
Get Argb. Color information based on the theme can also be obtained.
§Examples
let mut book = umya_spreadsheet::new_file();
let theme = book.theme();pub fn get_argb_with_theme(&self, theme: &Theme) -> Cow<'static, str>
👎Deprecated since 3.0.0:
Use argb_with_theme()
pub fn set_argb<S: Into<ARGB8>>(&mut self, value: S) -> &mut Self
pub fn set_argb_str<S: AsRef<str>>(&mut self, value: S) -> &mut Self
pub fn indexed(&self) -> u32
pub fn get_indexed(&self) -> u32
👎Deprecated since 3.0.0:
Use indexed()
pub fn set_indexed(&mut self, index: u32) -> &mut Self
pub fn theme_index(&self) -> u32
pub fn get_theme_index(&self) -> u32
👎Deprecated since 3.0.0:
Use theme_index()
pub fn set_theme_index(&mut self, index: u32) -> &mut Self
pub fn tint(&self) -> f64
pub fn get_tint(&self) -> f64
👎Deprecated since 3.0.0:
Use tint()
pub fn set_tint(&mut self, value: f64) -> &mut Color
Trait Implementations§
Source§impl PartialOrd for Color
impl PartialOrd for Color
impl StructuralPartialEq for Color
Auto Trait Implementations§
impl Freeze for Color
impl RefUnwindSafe for Color
impl Send for Color
impl Sync for Color
impl Unpin for Color
impl UnsafeUnpin for Color
impl UnwindSafe for Color
Blanket Implementations§
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