aboutsummaryrefslogtreecommitdiff
path: root/filters
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2024-02-01 21:45:59 +0100
committerRobin Jarry <robin@jarry.cc>2024-02-14 23:05:19 +0100
commitb6fd647d7d51ceaf386a79da6d04f57e0a7deac2 (patch)
tree5b9995e05c92c0fda6e1c59295828741378a692a /filters
parentabfb20f1d62c511778f8ee811a3ff6a02e93a32f (diff)
downloadaerc-b6fd647d7d51ceaf386a79da6d04f57e0a7deac2.tar.gz
aerc-b6fd647d7d51ceaf386a79da6d04f57e0a7deac2.zip
colorize: adapt default style for light backgrounds
The current default theme is unusable on light backgrounds. Some colors are too light and are almost invisible. Use only palette colors to ensure that everything is customizable by the user. I tested this with white on black, grey on dark purple, black on yellow, black on white. Text remains readable everywhere. Update stylesets that don't use these new defaults to explicitly override them. Changelog-changed: The default `colorize` theme has been changed to use the base terminal colors. Cc: Jason Cox <me@jasoncarloscox.com> Reported-by: Matěj Cepl <mcepl@cepl.eu> Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Diffstat (limited to 'filters')
-rw-r--r--filters/colorize.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/filters/colorize.c b/filters/colorize.c
index 01f2befc..36474ba9 100644
--- a/filters/colorize.c
+++ b/filters/colorize.c
@@ -160,19 +160,19 @@ static FILE *in_file;
static bool osc8_urls;
static const char *styleset;
static struct styles styles = {
- .url = { .underline = true, .fg = { .type = RGB, .rgb = 0xffffaf } },
- .header = { .bold = true, .fg = { .type = RGB, .rgb = 0xaf87ff } },
- .signature = { .dim = true, .fg = { .type = RGB, .rgb = 0xaf87ff } },
- .diff_meta = { .bold = true, .fg = { .type = RGB, .rgb = 0xffffff } },
- .diff_chunk = { .bold = true, .fg = { .type = RGB, .rgb = 0x00cdcd } },
- .diff_chunk_func = { .fg = { .type = RGB, .rgb = 0x00cdcd } },
- .diff_add = { .fg = { .type = RGB, .rgb = 0x00cd00 } },
- .diff_del = { .fg = { .type = RGB, .rgb = 0xcd0000 } },
- .quote_1 = { .fg = { .type = RGB, .rgb = 0x5fafff } },
- .quote_2 = { .fg = { .type = RGB, .rgb = 0xff8700 } },
- .quote_3 = { .fg = { .type = RGB, .rgb = 0xaf87ff } },
- .quote_4 = { .fg = { .type = RGB, .rgb = 0xff5fd7 } },
- .quote_x = { .fg = { .type = RGB, .rgb = 0x808080 } },
+ .url = { .underline = true, .fg = { .type = PALETTE, .index = 3 } },
+ .header = { .bold = true, .fg = { .type = PALETTE, .index = 4 } },
+ .signature = { .dim = true, .fg = { .type = PALETTE, .index = 4 } },
+ .diff_meta = { .bold = true },
+ .diff_chunk = { .fg = { .type = PALETTE, .index = 6 } },
+ .diff_chunk_func = { .dim = true, .fg = { .type = PALETTE, .index = 6 } },
+ .diff_add = { .fg = { .type = PALETTE, .index = 2 } },
+ .diff_del = { .fg = { .type = PALETTE, .index = 1 } },
+ .quote_1 = { .fg = { .type = PALETTE, .index = 6 } },
+ .quote_2 = { .fg = { .type = PALETTE, .index = 4 } },
+ .quote_3 = { .dim = true, .fg = { .type = PALETTE, .index = 6 } },
+ .quote_4 = { .dim = true, .fg = { .type = PALETTE, .index = 4 } },
+ .quote_x = { .dim = true, .fg = { .type = PALETTE, .index = 5 } },
};
static inline bool startswith(const char *s, const char *prefix)