summaryrefslogtreecommitdiff
path: root/src/ui/color.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-11-25 21:25:23 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-11-25 21:25:23 +0200
commitb0895acec06cef42c15c5c47a819ed9c8a71664f (patch)
tree1408af2cc2f8dc75fd36ad0a2d6973b39e9ec5dc /src/ui/color.c
parent373be1aaa272fe786e16f017787ee64ef453be66 (diff)
Tuning the Light mode color palette
The Light mode UI colors were a little bit garish; now they are much less saturated. ANSI foreground colors are darkened 50% on a bright background.
Diffstat (limited to 'src/ui/color.c')
-rw-r--r--src/ui/color.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/ui/color.c b/src/ui/color.c
index 332ef696..feec75ac 100644
--- a/src/ui/color.c
+++ b/src/ui/color.c
@@ -52,10 +52,10 @@ static const iColor lightPalette_[] = {
52 { 235, 235, 235, 255 }, 52 { 235, 235, 235, 255 },
53 { 255, 255, 255, 255 }, 53 { 255, 255, 255, 255 },
54 54
55 { 112, 80, 20, 255 }, 55 { 142, 100, 20, 255 },
56 { 255, 200, 86, 255 }, 56 { 215, 210, 200, 255 },
57 { 0, 80, 118, 255 }, 57 { 10, 85, 112, 255 },
58 { 120, 200, 220, 255 }, 58 { 150, 205, 220, 255 },
59 59
60 { 255, 255, 32, 255 }, 60 { 255, 255, 32, 255 },
61 { 255, 64, 64, 255 }, 61 { 255, 64, 64, 255 },
@@ -729,5 +729,11 @@ iColor ansiForeground_Color(iRangecc escapeSequence, int fallback) {
729 break; 729 break;
730 } 730 }
731 } 731 }
732 /* On light backgrounds, darken the colors to make them more legible. */
733 if (get_HSLColor(tmBackground_ColorId).lum > 0.5f) {
734 clr.r /= 2;
735 clr.g /= 2;
736 clr.b /= 2;
737 }
732 return clr; 738 return clr;
733} 739}