#[repr(u8)]pub enum RequestColor {
Show 20 variants
Black = 0,
Red = 1,
Green = 2,
Yellow = 3,
Blue = 4,
Magenta = 5,
Cyan = 6,
White = 7,
BrightBlack = 8,
BrightRed = 9,
BrightGreen = 10,
BrightYellow = 11,
BrightBlue = 12,
BrightMagenta = 13,
BrightCyan = 14,
BrightWhite = 15,
Foreground = 110,
Background = 111,
Cursor = 112,
Selection = 117,
}
Expand description
The enumeration of unit RequestColor
commands.
The discriminant ranges from 0 to 15 for the 16 ANSI colors. For the default foreground, default background, cursor, or selection colors, it is 100 plus the code used in the query. On Windows, this query is only supported by Terminal 1.22 or later.
Variants§
Black = 0
Red = 1
Green = 2
Yellow = 3
Blue = 4
Magenta = 5
Cyan = 6
White = 7
BrightBlack = 8
BrightRed = 9
BrightGreen = 10
BrightYellow = 11
BrightBlue = 12
BrightMagenta = 13
BrightCyan = 14
BrightWhite = 15
Foreground = 110
Background = 111
Cursor = 112
Selection = 117
Implementations§
Trait Implementations§
Source§impl Clone for RequestColor
impl Clone for RequestColor
Source§fn clone(&self) -> RequestColor
fn clone(&self) -> RequestColor
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 Debug for RequestColor
impl Debug for RequestColor
Source§impl Display for RequestColor
impl Display for RequestColor
Source§impl PartialEq for RequestColor
impl PartialEq for RequestColor
Source§impl Query for RequestColor
impl Query for RequestColor
Source§type Response = [(u16, u16); 3]
type Response = [(u16, u16); 3]
An RGB color.
The parsed response comprises one pair per RGB channel, with the first number the signal strength and the second number the signal width. The signal width is the number of hexadecimal digits, always between 1 and 4 inclusive, and usually 4. Hence, to normalize (s, w) to a floating point number between 0 and 1, compute s/((16^w)-1).
impl Command for RequestColor
impl Copy for RequestColor
impl Eq for RequestColor
impl StructuralPartialEq for RequestColor
Auto Trait Implementations§
impl Freeze for RequestColor
impl RefUnwindSafe for RequestColor
impl Send for RequestColor
impl Sync for RequestColor
impl Unpin for RequestColor
impl UnwindSafe for RequestColor
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