aboutsummaryrefslogtreecommitdiff
path: root/src/term/color.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/term/color.rs')
-rw-r--r--src/term/color.rs11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/term/color.rs b/src/term/color.rs
index d25f2f3d..6acd092a 100644
--- a/src/term/color.rs
+++ b/src/term/color.rs
@@ -4,7 +4,7 @@ use std::fmt;
use {Rgb, ansi};
use config::Colors;
-pub const COUNT: usize = 268;
+pub const COUNT: usize = 270;
/// List of indexed colors
///
@@ -13,6 +13,7 @@ pub const COUNT: usize = 268;
/// the configured foreground color, item 257 is the configured background
/// color, item 258 is the cursor foreground color, item 259 is the cursor
/// background color. Following that are 8 positions for dim colors.
+/// Item 268 is the bright foreground color, 269 the dim foreground.
#[derive(Copy, Clone)]
pub struct List([Rgb; COUNT]);
@@ -50,6 +51,10 @@ impl List {
self[ansi::NamedColor::BrightMagenta] = colors.bright.magenta;
self[ansi::NamedColor::BrightCyan] = colors.bright.cyan;
self[ansi::NamedColor::BrightWhite] = colors.bright.white;
+ self[ansi::NamedColor::BrightForeground] = colors
+ .primary
+ .bright_foreground
+ .unwrap_or(colors.primary.foreground);
// Foreground and background
self[ansi::NamedColor::Foreground] = colors.primary.foreground;
@@ -60,6 +65,10 @@ impl List {
self[ansi::NamedColor::Cursor] = colors.cursor.cursor;
// Dims
+ self[ansi::NamedColor::DimForeground] = colors
+ .primary
+ .dim_foreground
+ .unwrap_or(colors.primary.foreground * 0.66);
match colors.dim {
Some(ref dim) => {
trace!("Using config-provided dim colors");