diff options
Diffstat (limited to 'src/style.rs')
-rw-r--r-- | src/style.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/style.rs b/src/style.rs index 80256805..339e3f02 100644 --- a/src/style.rs +++ b/src/style.rs @@ -170,6 +170,18 @@ const DARK_THEME_PLUS_EMPH_COLOR_256: Color = Color { /// A special color to specify that no color escape codes should be emitted. pub const NO_COLOR: Color = Color::BLACK; +/// A special color value to signify that the foreground color of a style should be derived from +/// syntax highlighting. +// alpha is 0, which is how the 256-palette colors are encoded (see bat::terminal::to_ansi_color). +// So if painted, this would be black. However, the presence of a non-zero bit in the blue channel +// distinguishes this from any 256-palette color. +pub const SYNTAX_HIGHLIGHTING_COLOR: Color = Color { + r: 0x00, + g: 0x00, + b: 0x01, + a: 0x00, +}; + pub fn get_no_style() -> Style { Style { foreground: NO_COLOR, |