aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src/display/color.rs
diff options
context:
space:
mode:
authorAnhad Singh <62820092+Andy-Python-Programmer@users.noreply.github.com>2023-05-24 06:35:58 +1000
committerGitHub <noreply@github.com>2023-05-23 20:35:58 +0000
commitcb7ad5b7e6893787c2006cc8cb09fbbc4711c0f7 (patch)
treee8c5315bb620e6d4e1564dfd6825303b498a3d6d /alacritty/src/display/color.rs
parentf0379f2da751e81ba05bbf65ecb5e59590f39be4 (diff)
downloadr-alacritty-cb7ad5b7e6893787c2006cc8cb09fbbc4711c0f7.tar.gz
r-alacritty-cb7ad5b7e6893787c2006cc8cb09fbbc4711c0f7.tar.bz2
r-alacritty-cb7ad5b7e6893787c2006cc8cb09fbbc4711c0f7.zip
Switch to VTE's built-in ansi feature
Co-authored-by: Christian Duerr <contact@christianduerr.com>
Diffstat (limited to 'alacritty/src/display/color.rs')
-rw-r--r--alacritty/src/display/color.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/alacritty/src/display/color.rs b/alacritty/src/display/color.rs
index 6e0de048..054ca314 100644
--- a/alacritty/src/display/color.rs
+++ b/alacritty/src/display/color.rs
@@ -95,11 +95,11 @@ impl List {
{
self[index] = indexed_color.color;
} else {
- self[index] = Rgb {
- r: if r == 0 { 0 } else { r * 40 + 55 },
- b: if b == 0 { 0 } else { b * 40 + 55 },
- g: if g == 0 { 0 } else { g * 40 + 55 },
- };
+ self[index] = Rgb::new(
+ if r == 0 { 0 } else { r * 40 + 55 },
+ if b == 0 { 0 } else { b * 40 + 55 },
+ if g == 0 { 0 } else { g * 40 + 55 },
+ );
}
index += 1;
}
@@ -126,7 +126,7 @@ impl List {
}
let value = i * 10 + 8;
- self[index] = Rgb { r: value, g: value, b: value };
+ self[index] = Rgb::new(value, value, value);
index += 1;
}