#[non_exhaustive]pub enum ColorSupport {
Truecolor,
Indexed256,
Ansi16,
None,
}Expand description
How aggressively TerminalRenderer quantizes Color before emitting an SGR sequence.
See the crate-level “RGB color fallback on 256-color terminals” doc section for the full
contract, and TerminalRenderer::with_color_support/TerminalRenderer::set_color_support
to configure it.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Truecolor
No quantization: Color::Rgb tiles are written out verbatim as a 24-bit truecolor SGR
sequence. The default, matching this renderer’s historical behavior.
Indexed256
Color::Rgb tiles are quantized to the nearest of the 256 indexed-color palette entries
via Color::to_indexed before being written.
Ansi16
Color::Rgb tiles are quantized to the nearest of the 16 standard ANSI colors via
Color::to_ansi before being written.
None
Every Color is forced to Color::Default: no SGR color codes are emitted at all.
Trait Implementations§
Source§impl Clone for ColorSupport
impl Clone for ColorSupport
Source§fn clone(&self) -> ColorSupport
fn clone(&self) -> ColorSupport
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ColorSupport
impl Debug for ColorSupport
Source§impl Default for ColorSupport
impl Default for ColorSupport
Source§fn default() -> ColorSupport
fn default() -> ColorSupport
Source§impl Hash for ColorSupport
impl Hash for ColorSupport
Source§impl PartialEq for ColorSupport
impl PartialEq for ColorSupport
Source§fn eq(&self, other: &ColorSupport) -> bool
fn eq(&self, other: &ColorSupport) -> bool
self and other values to be equal, and is used by ==.impl Copy for ColorSupport
impl Eq for ColorSupport
impl StructuralPartialEq for ColorSupport
Auto Trait Implementations§
impl Freeze for ColorSupport
impl RefUnwindSafe for ColorSupport
impl Send for ColorSupport
impl Sync for ColorSupport
impl Unpin for ColorSupport
impl UnsafeUnpin for ColorSupport
impl UnwindSafe for ColorSupport
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<C> WithAlpha for Cwhere
C: Copy,
impl<C> WithAlpha for Cwhere
C: Copy,
§fn with_alpha_first<A>(self, alpha: A) -> AlphaFirst<A, Self>
fn with_alpha_first<A>(self, alpha: A) -> AlphaFirst<A, Self>
self with alpha, storing alpha before the color in memory
(see [AlphaFirst]).§fn with_alpha_last<A>(self, alpha: A) -> AlphaLast<A, Self>
fn with_alpha_last<A>(self, alpha: A) -> AlphaLast<A, Self>
self with alpha, storing alpha after the color in memory
(see [AlphaLast]).