config: add [colors-dark] and [colors-light], replacing [colors] and [colors2]

The main reason for having two color sections is to be able to switch
between dark and light. Thus, it's better if the section names reflect
this, rather than the more generic 'colors' and 'colors2' (which was
the dark one and which was the light one, now again?)

When the second color section was added, we kept the original name,
colors, to make sure we didn't break existing configurations, and
third-party themes.

However, in the long run, it's probably better to be specific in the
section naming, to avoid confusion.

So, add 'colors-dark', and 'colors-light'. Keep 'colors' and 'colors2'
as aliases for now, but mark them as deprecated. They WILL be removed
in a future release.

Also rename the option values for initial-color-theme, from 1/2, to
dark/light. Keep the old ones for now, marked as deprecated.

Update all bundled themes to use the new names. In the light-only
themes (i.e. themes that define a single, light, theme), use
colors-light, and set initial-color-theme=light.

Possible improvements: disable color switching if only one color
section has been explicitly configured (todo: figure out how to handle
the default color theme values...)
This commit is contained in:
Daniel Eklöf 2025-12-19 09:29:06 +01:00
parent 4e96780eef
commit cf2b390f6e
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
103 changed files with 542 additions and 298 deletions

View file

@ -74,6 +74,8 @@
`foot` and `footclient`), allowing you to set a custom toplevel `foot` and `footclient`), allowing you to set a custom toplevel
tag. The compositor must implement the new `xdg-toplevel-tag-v1` tag. The compositor must implement the new `xdg-toplevel-tag-v1`
Wayland protocol ([#2212][2212]). Wayland protocol ([#2212][2212]).
* `[colors-dark]` section to `foot.ini`. Replaces `[colors]`.
* `[colors-light]` section to `foot.ini`. Replaces `[colors2]`.
[2212]: https://codeberg.org/dnkl/foot/issues/2212 [2212]: https://codeberg.org/dnkl/foot/issues/2212
@ -93,6 +95,11 @@
### Deprecated ### Deprecated
* `[colors]` section in `foot.ini`. Use `[colors-dark]` instead.
* `[colors2]` section in `foot.ini`. Use `[colors-light]` instead.
### Removed ### Removed
### Fixed ### Fixed

128
config.c
View file

@ -144,6 +144,8 @@ static const char *const binding_action_map[] = {
[BIND_ACTION_REGEX_COPY] = "regex-copy", [BIND_ACTION_REGEX_COPY] = "regex-copy",
[BIND_ACTION_THEME_SWITCH_1] = "color-theme-switch-1", [BIND_ACTION_THEME_SWITCH_1] = "color-theme-switch-1",
[BIND_ACTION_THEME_SWITCH_2] = "color-theme-switch-2", [BIND_ACTION_THEME_SWITCH_2] = "color-theme-switch-2",
[BIND_ACTION_THEME_SWITCH_DARK] = "color-theme-switch-dark",
[BIND_ACTION_THEME_SWITCH_LIGHT] = "color-theme-switch-light",
[BIND_ACTION_THEME_TOGGLE] = "color-theme-toggle", [BIND_ACTION_THEME_TOGGLE] = "color-theme-toggle",
/* Mouse-specific actions */ /* Mouse-specific actions */
@ -1118,8 +1120,40 @@ parse_section_main(struct context *ctx)
sizeof(conf->initial_color_theme) == sizeof(int), sizeof(conf->initial_color_theme) == sizeof(int),
"enum is not 32-bit"); "enum is not 32-bit");
return value_to_enum(ctx, (const char*[]){"1", "2", NULL}, if (!value_to_enum(ctx, (const char*[]){
(int *)&conf->initial_color_theme); "dark", "light", "1", "2", NULL},
(int *)&conf->initial_color_theme))
return false;
if (streq(ctx->value, "1")) {
LOG_WARN("%s:%d: [main].initial-color-theme=1 deprecated, "
"use [main].initial-color-theme=dark instead",
ctx->path, ctx->lineno);
user_notification_add(
&ctx->conf->notifications,
USER_NOTIFICATION_DEPRECATED,
xstrdup("[main].initial-color-theme=1: "
"use [main].initial-color-theme=dark instead"));
conf->initial_color_theme = COLOR_THEME_DARK;
}
else if (streq(ctx->value, "2")) {
LOG_WARN("%s:%d: [main].initial-color-theme=2 deprecated, "
"use [main].initial-color-theme=light instead",
ctx->path, ctx->lineno);
user_notification_add(
&ctx->conf->notifications,
USER_NOTIFICATION_DEPRECATED,
xstrdup("[main].initial-color-theme=2: "
"use [main].initial-color-theme=light instead"));
conf->initial_color_theme = COLOR_THEME_LIGHT;
}
return true;
} }
else if (streq(key, "uppercase-regex-insert")) else if (streq(key, "uppercase-regex-insert"))
@ -1555,16 +1589,44 @@ parse_color_theme(struct context *ctx, struct color_theme *theme)
return true; return true;
} }
static bool
parse_section_colors_dark(struct context *ctx)
{
return parse_color_theme(ctx, &ctx->conf->colors_dark);
}
static bool
parse_section_colors_light(struct context *ctx)
{
return parse_color_theme(ctx, &ctx->conf->colors_light);
}
static bool static bool
parse_section_colors(struct context *ctx) parse_section_colors(struct context *ctx)
{ {
return parse_color_theme(ctx, &ctx->conf->colors); LOG_WARN("%s:%d: [colors]: deprecated; use [colors-dark] instead",
ctx->path, ctx->lineno);
user_notification_add(
&ctx->conf->notifications,
USER_NOTIFICATION_DEPRECATED,
xstrdup("[colors]: use [colors-dark] instead"));
return parse_color_theme(ctx, &ctx->conf->colors_dark);
} }
static bool static bool
parse_section_colors2(struct context *ctx) parse_section_colors2(struct context *ctx)
{ {
return parse_color_theme(ctx, &ctx->conf->colors2); LOG_WARN("%s:%d: [colors2]: deprecated; use [colors-light] instead",
ctx->path, ctx->lineno);
user_notification_add(
&ctx->conf->notifications,
USER_NOTIFICATION_DEPRECATED,
xstrdup("[colors2]: use [colors-light] instead"));
return parse_color_theme(ctx, &ctx->conf->colors_light);
} }
static bool static bool
@ -1610,14 +1672,14 @@ parse_section_cursor(struct context *ctx)
if (!value_to_two_colors( if (!value_to_two_colors(
ctx, ctx,
&conf->colors.cursor.text, &conf->colors_dark.cursor.text,
&conf->colors.cursor.cursor, &conf->colors_dark.cursor.cursor,
false)) false))
{ {
return false; return false;
} }
conf->colors.use_custom.cursor = true; conf->colors_dark.use_custom.cursor = true;
return true; return true;
} }
@ -2268,6 +2330,29 @@ parse_key_binding_section(struct context *ctx,
aux.regex_name = regex_name; aux.regex_name = regex_name;
} }
if (action_map == binding_action_map &&
action >= BIND_ACTION_THEME_SWITCH_1 &&
action <= BIND_ACTION_THEME_SWITCH_2)
{
const char *use_instead =
action_map[action == BIND_ACTION_THEME_SWITCH_1
? BIND_ACTION_THEME_SWITCH_DARK
: BIND_ACTION_THEME_SWITCH_LIGHT];
const char *notif = action == BIND_ACTION_THEME_SWITCH_1
? "[key-bindings].color-theme-switch-1: use [key-bindings].color-theme-switch-dark instead"
: "[key-bindings].color-theme-switch-2: use [key-bindings].color-theme-switch-light instead";
LOG_WARN("%s:%d: [key-bindings].%s: deprecated, use %s instead",
ctx->path, ctx->lineno,
action_map[action], use_instead);
user_notification_add(
&ctx->conf->notifications,
USER_NOTIFICATION_DEPRECATED,
xstrdup(notif));
}
if (!value_to_key_combos(ctx, action, &aux, bindings, KEY_BINDING)) { if (!value_to_key_combos(ctx, action, &aux, bindings, KEY_BINDING)) {
free_binding_aux(&aux); free_binding_aux(&aux);
return false; return false;
@ -2958,8 +3043,8 @@ enum section {
SECTION_SCROLLBACK, SECTION_SCROLLBACK,
SECTION_URL, SECTION_URL,
SECTION_REGEX, SECTION_REGEX,
SECTION_COLORS, SECTION_COLORS_DARK,
SECTION_COLORS2, SECTION_COLORS_LIGHT,
SECTION_CURSOR, SECTION_CURSOR,
SECTION_MOUSE, SECTION_MOUSE,
SECTION_CSD, SECTION_CSD,
@ -2971,6 +3056,11 @@ enum section {
SECTION_ENVIRONMENT, SECTION_ENVIRONMENT,
SECTION_TWEAK, SECTION_TWEAK,
SECTION_TOUCH, SECTION_TOUCH,
/* Deprecated */
SECTION_COLORS,
SECTION_COLORS2,
SECTION_COUNT, SECTION_COUNT,
}; };
@ -2989,8 +3079,8 @@ static const struct {
[SECTION_SCROLLBACK] = {&parse_section_scrollback, "scrollback"}, [SECTION_SCROLLBACK] = {&parse_section_scrollback, "scrollback"},
[SECTION_URL] = {&parse_section_url, "url"}, [SECTION_URL] = {&parse_section_url, "url"},
[SECTION_REGEX] = {&parse_section_regex, "regex", true}, [SECTION_REGEX] = {&parse_section_regex, "regex", true},
[SECTION_COLORS] = {&parse_section_colors, "colors"}, [SECTION_COLORS_DARK] = {&parse_section_colors_dark, "colors-dark"},
[SECTION_COLORS2] = {&parse_section_colors2, "colors2"}, [SECTION_COLORS_LIGHT] = {&parse_section_colors_light, "colors-light"},
[SECTION_CURSOR] = {&parse_section_cursor, "cursor"}, [SECTION_CURSOR] = {&parse_section_cursor, "cursor"},
[SECTION_MOUSE] = {&parse_section_mouse, "mouse"}, [SECTION_MOUSE] = {&parse_section_mouse, "mouse"},
[SECTION_CSD] = {&parse_section_csd, "csd"}, [SECTION_CSD] = {&parse_section_csd, "csd"},
@ -3002,6 +3092,10 @@ static const struct {
[SECTION_ENVIRONMENT] = {&parse_section_environment, "environment"}, [SECTION_ENVIRONMENT] = {&parse_section_environment, "environment"},
[SECTION_TWEAK] = {&parse_section_tweak, "tweak"}, [SECTION_TWEAK] = {&parse_section_tweak, "tweak"},
[SECTION_TOUCH] = {&parse_section_touch, "touch"}, [SECTION_TOUCH] = {&parse_section_touch, "touch"},
/* Deprecated */
[SECTION_COLORS] = {&parse_section_colors, "colors"},
[SECTION_COLORS2] = {&parse_section_colors2, "colors2"},
}; };
static_assert(ALEN(section_info) == SECTION_COUNT, "section info array size mismatch"); static_assert(ALEN(section_info) == SECTION_COUNT, "section info array size mismatch");
@ -3435,7 +3529,7 @@ config_load(struct config *conf, const char *conf_path,
}, },
.multiplier = 3., .multiplier = 3.,
}, },
.colors = { .colors_dark = {
.fg = default_foreground, .fg = default_foreground,
.bg = default_background, .bg = default_background,
.flash = 0x7f7f00, .flash = 0x7f7f00,
@ -3455,7 +3549,7 @@ config_load(struct config *conf, const char *conf_path,
.url = false, .url = false,
}, },
}, },
.initial_color_theme = COLOR_THEME1, .initial_color_theme = COLOR_THEME_DARK,
.cursor = { .cursor = {
.style = CURSOR_BLOCK, .style = CURSOR_BLOCK,
.unfocused_style = CURSOR_UNFOCUSED_HOLLOW, .unfocused_style = CURSOR_UNFOCUSED_HOLLOW,
@ -3535,10 +3629,10 @@ config_load(struct config *conf, const char *conf_path,
.notifications = tll_init(), .notifications = tll_init(),
}; };
memcpy(conf->colors.table, default_color_table, sizeof(default_color_table)); memcpy(conf->colors_dark.table, default_color_table, sizeof(default_color_table));
memcpy(conf->colors.sixel, default_sixel_colors, sizeof(default_sixel_colors)); memcpy(conf->colors_dark.sixel, default_sixel_colors, sizeof(default_sixel_colors));
memcpy(&conf->colors2, &conf->colors, sizeof(conf->colors)); memcpy(&conf->colors_light, &conf->colors_dark, sizeof(conf->colors_dark));
conf->colors2.dim_blend_towards = DIM_BLEND_TOWARDS_WHITE; conf->colors_light.dim_blend_towards = DIM_BLEND_TOWARDS_WHITE;
parse_modifiers(XKB_MOD_NAME_SHIFT, 5, &conf->mouse.selection_override_modifiers); parse_modifiers(XKB_MOD_NAME_SHIFT, 5, &conf->mouse.selection_override_modifiers);

View file

@ -195,8 +195,10 @@ struct color_theme {
}; };
enum which_color_theme { enum which_color_theme {
COLOR_THEME1, COLOR_THEME_DARK,
COLOR_THEME2, COLOR_THEME_LIGHT,
COLOR_THEME_1, /* Deprecated */
COLOR_THEME_2, /* Deprecated */
}; };
enum shm_bit_depth { enum shm_bit_depth {
@ -327,8 +329,8 @@ struct config {
tll(struct custom_regex) custom_regexes; tll(struct custom_regex) custom_regexes;
struct color_theme colors; struct color_theme colors_dark;
struct color_theme colors2; struct color_theme colors_light;
enum which_color_theme initial_color_theme; enum which_color_theme initial_color_theme;
struct { struct {

2
csi.c
View file

@ -1578,7 +1578,7 @@ csi_dispatch(struct terminal *term, uint8_t final)
int chars = snprintf( int chars = snprintf(
reply, sizeof(reply), reply, sizeof(reply),
"\033[?997;%dn", "\033[?997;%dn",
term->colors.active_theme == COLOR_THEME1 ? 1 : 2); term->colors.active_theme == COLOR_THEME_DARK ? 1 : 2);
term_to_slave(term, reply, chars); term_to_slave(term, reply, chars);
break; break;

View file

@ -695,8 +695,8 @@ variables to unset may be defined in *foot.ini*(5).
The following signals have special meaning in foot: The following signals have special meaning in foot:
- SIGUSR1: switch to color theme 1 (i.e. use the *[colors]* section). - SIGUSR1: switch to the dark color theme (*[colors-dark]*).
- SIGUSR2: switch to color theme 2 (i.e. use the *[colors2]* section). - SIGUSR2: switch to the light color theme (*[colors-light]*).
Note: you can send SIGUSR1/SIGUSR2 to a *foot --server* process too, Note: you can send SIGUSR1/SIGUSR2 to a *foot --server* process too,
in which case all client instances will switch theme. Furthermore, all in which case all client instances will switch theme. Furthermore, all

View file

@ -24,7 +24,7 @@ commented out will usually be installed to */etc/xdg/foot/foot.ini*.
Options are set using KEY=VALUE pairs: Options are set using KEY=VALUE pairs:
*\[colors\]*++ *\[colors-dark\]*++
*background=000000*++ *background=000000*++
*foreground=ffffff* *foreground=ffffff*
@ -371,12 +371,12 @@ empty string to be set, but it must be quoted: *KEY=""*)
Default: _yes_ Default: _yes_
*initial-color-theme* *initial-color-theme*
Selects which color theme to use, *1*, or *2*. Selects which color theme to use, *dark*, or *light*.
*1* uses the colors defined in the *colors* section, while *2* *dark* uses the colors defined in the *colors-dark* section, while
uses the colors from the *colors2* section. *light* uses the colors from the *colors-light* section.
Use the *color-theme-switch-1*, *color-theme-switch-2* and Use the *color-theme-switch-dark*, *color-theme-switch-light* and
*color-theme-toggle* key bindings to switch between the two themes *color-theme-toggle* key bindings to switch between the two themes
at runtime, or send SIGUSR1/SIGUSR2 to the foot process (see at runtime, or send SIGUSR1/SIGUSR2 to the foot process (see
*foot*(1) for details). *foot*(1) for details).
@ -987,19 +987,24 @@ applications can change these at runtime.
Default: _400_. Default: _400_.
# SECTION: colors # SECTION: colors-dark, colors-light
This section controls the 16 ANSI colors, the default foreground and These two sections controls the 16 ANSI colors, the default foreground
background colors, and the extended 256 color palette. Note that and background colors, and the extended 256 color palette. Note that
applications can change these at runtime. applications can change these at runtime.
The colors are in RRGGBB format (i.e. plain old 6-digit hex values, The colors are in RRGGBB format (i.e. plain old 6-digit hex values,
without prefix). That is, they do *not* have an alpha component. You without prefix). That is, they do *not* have an alpha component. You
can configure the background transparency with the _alpha_ option. can configure the background transparency with the _alpha_ option.
In the context of private mode 2031 (Dark and Light Mode detection), *colors-dark* is intended to define a dark color theme, and
the primary theme (i.e. the *colors* section) is considered to be the *colors-light* is intended to define a light color theme. You can
dark theme (since the default theme is dark). switch between them using the *color-theme-switch-dark*,
*color-theme-switch-light* and *color-theme-toggle* key bindings, or
by sending SIGUSR1/SIGUSR2 to the foot process.
The default theme used is *colors-dark*, unless
*initial-color-theme=light* has been set.
*cursor* *cursor*
Two space separated RRGGBB values (i.e. plain old 6-digit hex Two space separated RRGGBB values (i.e. plain old 6-digit hex
@ -1098,7 +1103,7 @@ dark theme (since the default theme is dark).
black makes the text darker, while blending towards white makes it black makes the text darker, while blending towards white makes it
whiter (but still dimmer than normal text). whiter (but still dimmer than normal text).
Default: _black_ (*colors*), _white_ (*colors2*) Default: _black_ (*colors-dark*), _white_ (*colors-light*)
*selection-foreground*, *selection-background* *selection-foreground*, *selection-background*
Foreground (text) and background color to use in selected Foreground (text) and background color to use in selected
@ -1135,20 +1140,6 @@ dark theme (since the default theme is dark).
Flash translucency. A value in the range 0.0-1.0, where 0.0 means Flash translucency. A value in the range 0.0-1.0, where 0.0 means
completely transparent, and 1.0 is opaque. Default: _0.5_. completely transparent, and 1.0 is opaque. Default: _0.5_.
# SECTION: colors2
This section defines an alternative color theme. It has the exact same
keys as the *colors* section. The default values are the same, except
for *dim-blend-towards*, which defaults to *white* instead.
Note that values are not inherited. That is, if you set a value in
*colors*, but not in *colors2*, the value from *colors* is not
inherited by *colors2*.
In the context of private mode 2031 (Dark and Light Mode detection),
the alternative theme (i.e. the *colors2* section) is considered to be
the light theme (since the default, the primary theme, is dark).
# SECTION: csd # SECTION: csd
This section controls the look of the _CSDs_ (Client Side This section controls the look of the _CSDs_ (Client Side
@ -1455,16 +1446,16 @@ e.g. *search-start=none*.
Default: _Control+Shift+u_. Default: _Control+Shift+u_.
*color-theme-switch-1*, *color-theme-switch-2*, *color-theme-toggle* *color-theme-switch-dark*, *color-theme-switch-dark*, *color-theme-toggle*
Switch between the primary color theme (defined in the *colors* Switch between the dark color theme (defined in the *colors-dark*
section), and the alternative color theme (defined in the section), and the light color theme (defined in the *colors-light*
*colors2* section). section).
*color-theme-switch-1* applies the primary color theme regardless *color-theme-switch-dark* applies the dark color theme regardless
of which color theme is currently active. of which color theme is currently active.
*color-theme-switch-2* applies the alternative color theme regardless *color-theme-switch-light* applies the light color theme
of which color theme is currently active. regardless of which color theme is currently active.
*color-theme-toggle* toggles between the primary and alternative *color-theme-toggle* toggles between the primary and alternative
color themes. color themes.

View file

@ -198,8 +198,8 @@ variables to unset may be defined in *foot.ini*(5).
The following signals have special meaning in footclient: The following signals have special meaning in footclient:
- SIGUSR1: switch to color theme 1 (i.e. use the *[colors]* section). - SIGUSR1: switch to the dark color theme (*[colors-dark]*).
- SIGUSR2: switch to color theme 2 (i.e. use the *[colors2]* section). - SIGUSR2: switch to the light color theme (*[colors-light]*).
When sending SIGUSR1/SIGUSR2 to a footclient instance, the theme is When sending SIGUSR1/SIGUSR2 to a footclient instance, the theme is
changed in that instance only. This is different from when you send changed in that instance only. This is different from when you send

View file

@ -24,7 +24,7 @@
# dpi-aware=no # dpi-aware=no
# gamma-correct-blending=no # gamma-correct-blending=no
# initial-color-theme=1 # initial-color-theme=dark
# initial-window-size-pixels=700x500 # Or, # initial-window-size-pixels=700x500 # Or,
# initial-window-size-chars=<COLSxROWS> # initial-window-size-chars=<COLSxROWS>
# initial-window-mode=windowed # initial-window-mode=windowed
@ -101,7 +101,7 @@
[touch] [touch]
# long-press-delay=400 # long-press-delay=400
[colors] [colors-dark]
# alpha=1.0 # alpha=1.0
# alpha-mode=default # Can be `default`, `matching` or `all` # alpha-mode=default # Can be `default`, `matching` or `all`
# background=242424 # background=242424
@ -169,7 +169,7 @@
# search-box-match=<regular0> <regular3> # black-on-yellow # search-box-match=<regular0> <regular3> # black-on-yellow
# urls=<regular3> # urls=<regular3>
[colors2] [colors-light]
# Alternative color theme, see man page foot.ini(5) # Alternative color theme, see man page foot.ini(5)
# Same builtin defaults as [color], except for: # Same builtin defaults as [color], except for:
# dim-blend-towards=white # dim-blend-towards=white

View file

@ -486,11 +486,13 @@ execute_binding(struct seat *seat, struct terminal *term,
return true; return true;
case BIND_ACTION_THEME_SWITCH_1: case BIND_ACTION_THEME_SWITCH_1:
term_theme_switch_to_1(term); case BIND_ACTION_THEME_SWITCH_DARK:
term_theme_switch_to_dark(term);
return true; return true;
case BIND_ACTION_THEME_SWITCH_2: case BIND_ACTION_THEME_SWITCH_2:
term_theme_switch_to_2(term); case BIND_ACTION_THEME_SWITCH_LIGHT:
term_theme_switch_to_light(term);
return true; return true;
case BIND_ACTION_THEME_TOGGLE: case BIND_ACTION_THEME_TOGGLE:

View file

@ -45,6 +45,8 @@ enum bind_action_normal {
BIND_ACTION_REGEX_COPY, BIND_ACTION_REGEX_COPY,
BIND_ACTION_THEME_SWITCH_1, BIND_ACTION_THEME_SWITCH_1,
BIND_ACTION_THEME_SWITCH_2, BIND_ACTION_THEME_SWITCH_2,
BIND_ACTION_THEME_SWITCH_DARK,
BIND_ACTION_THEME_SWITCH_LIGHT,
BIND_ACTION_THEME_TOGGLE, BIND_ACTION_THEME_TOGGLE,
/* Mouse specific actions - i.e. they require a mouse coordinate */ /* Mouse specific actions - i.e. they require a mouse coordinate */

8
main.c
View file

@ -59,14 +59,14 @@ fdm_sigusr(struct fdm *fdm, int signo, void *data)
if (ctx->server != NULL) { if (ctx->server != NULL) {
if (signo == SIGUSR1) if (signo == SIGUSR1)
server_global_theme_switch_to_1(ctx->server); server_global_theme_switch_to_dark(ctx->server);
else else
server_global_theme_switch_to_2(ctx->server); server_global_theme_switch_to_light(ctx->server);
} else { } else {
if (signo == SIGUSR1) if (signo == SIGUSR1)
term_theme_switch_to_1(ctx->term); term_theme_switch_to_dark(ctx->term);
else else
term_theme_switch_to_2(ctx->term); term_theme_switch_to_light(ctx->term);
} }
return true; return true;

44
osc.c
View file

@ -1459,9 +1459,9 @@ osc_dispatch(struct terminal *term)
case 11: case 11:
term->colors.bg = color; term->colors.bg = color;
if (!have_alpha) { if (!have_alpha) {
alpha = term->colors.active_theme == COLOR_THEME1 alpha = term->colors.active_theme == COLOR_THEME_DARK
? term->conf->colors.alpha ? term->conf->colors_dark.alpha
: term->conf->colors2.alpha; : term->conf->colors_light.alpha;
} }
const bool changed = term->colors.alpha != alpha; const bool changed = term->colors.alpha != alpha;
@ -1516,9 +1516,9 @@ osc_dispatch(struct terminal *term)
/* Reset Color Number 'c' (whole table if no parameter) */ /* Reset Color Number 'c' (whole table if no parameter) */
const struct color_theme *theme = const struct color_theme *theme =
term->colors.active_theme == COLOR_THEME1 term->colors.active_theme == COLOR_THEME_DARK
? &term->conf->colors ? &term->conf->colors_dark
: &term->conf->colors2; : &term->conf->colors_light;
if (string[0] == '\0') { if (string[0] == '\0') {
LOG_DBG("resetting all colors"); LOG_DBG("resetting all colors");
@ -1559,9 +1559,9 @@ osc_dispatch(struct terminal *term)
LOG_DBG("resetting foreground color"); LOG_DBG("resetting foreground color");
const struct color_theme *theme = const struct color_theme *theme =
term->colors.active_theme == COLOR_THEME1 term->colors.active_theme == COLOR_THEME_DARK
? &term->conf->colors ? &term->conf->colors_dark
: &term->conf->colors2; : &term->conf->colors_light;
term->colors.fg = theme->fg; term->colors.fg = theme->fg;
term_damage_color(term, COLOR_DEFAULT, 0); term_damage_color(term, COLOR_DEFAULT, 0);
@ -1571,9 +1571,9 @@ osc_dispatch(struct terminal *term)
LOG_DBG("resetting background color"); LOG_DBG("resetting background color");
const struct color_theme *theme = const struct color_theme *theme =
term->colors.active_theme == COLOR_THEME1 term->colors.active_theme == COLOR_THEME_DARK
? &term->conf->colors ? &term->conf->colors_dark
: &term->conf->colors2; : &term->conf->colors_light;
bool alpha_changed = term->colors.alpha != theme->alpha; bool alpha_changed = term->colors.alpha != theme->alpha;
@ -1594,14 +1594,14 @@ osc_dispatch(struct terminal *term)
LOG_DBG("resetting cursor color"); LOG_DBG("resetting cursor color");
const struct color_theme *theme = const struct color_theme *theme =
term->colors.active_theme == COLOR_THEME1 term->colors.active_theme == COLOR_THEME_DARK
? &term->conf->colors ? &term->conf->colors_dark
: &term->conf->colors2; : &term->conf->colors_light;
term->colors.cursor_fg = theme->cursor.text; term->colors.cursor_fg = theme->cursor.text;
term->colors.cursor_bg = theme->cursor.cursor; term->colors.cursor_bg = theme->cursor.cursor;
if (term->conf->colors.use_custom.cursor) { if (term->conf->colors_dark.use_custom.cursor) {
term->colors.cursor_fg |= 1u << 31; term->colors.cursor_fg |= 1u << 31;
term->colors.cursor_bg |= 1u << 31; term->colors.cursor_bg |= 1u << 31;
} }
@ -1614,9 +1614,9 @@ osc_dispatch(struct terminal *term)
LOG_DBG("resetting selection background color"); LOG_DBG("resetting selection background color");
const struct color_theme *theme = const struct color_theme *theme =
term->colors.active_theme == COLOR_THEME1 term->colors.active_theme == COLOR_THEME_DARK
? &term->conf->colors ? &term->conf->colors_dark
: &term->conf->colors2; : &term->conf->colors_light;
term->colors.selection_bg = theme->selection_bg; term->colors.selection_bg = theme->selection_bg;
break; break;
@ -1626,9 +1626,9 @@ osc_dispatch(struct terminal *term)
LOG_DBG("resetting selection foreground color"); LOG_DBG("resetting selection foreground color");
const struct color_theme *theme = const struct color_theme *theme =
term->colors.active_theme == COLOR_THEME1 term->colors.active_theme == COLOR_THEME_DARK
? &term->conf->colors ? &term->conf->colors_dark
: &term->conf->colors2; : &term->conf->colors_light;
term->colors.selection_fg = theme->selection_fg; term->colors.selection_fg = theme->selection_fg;
break; break;

View file

@ -293,7 +293,7 @@ static inline uint32_t
color_dim(const struct terminal *term, uint32_t color) color_dim(const struct terminal *term, uint32_t color)
{ {
const struct config *conf = term->conf; const struct config *conf = term->conf;
const uint8_t custom_dim = conf->colors.use_custom.dim; const uint8_t custom_dim = conf->colors_dark.use_custom.dim;
if (unlikely(custom_dim != 0)) { if (unlikely(custom_dim != 0)) {
for (size_t i = 0; i < 8; i++) { for (size_t i = 0; i < 8; i++) {
@ -302,7 +302,7 @@ color_dim(const struct terminal *term, uint32_t color)
if (term->colors.table[0 + i] == color) { if (term->colors.table[0 + i] == color) {
/* "Regular" color, return the corresponding "dim" */ /* "Regular" color, return the corresponding "dim" */
return conf->colors.dim[i]; return conf->colors_dark.dim[i];
} }
else if (term->colors.table[8 + i] == color) { else if (term->colors.table[8 + i] == color) {
@ -312,9 +312,9 @@ color_dim(const struct terminal *term, uint32_t color)
} }
} }
const struct color_theme *theme = term->colors.active_theme == COLOR_THEME1 const struct color_theme *theme = term->colors.active_theme == COLOR_THEME_DARK
? &conf->colors ? &conf->colors_dark
: &conf->colors2; : &conf->colors_light;
return color_blend_towards( return color_blend_towards(
color, color,
@ -776,7 +776,7 @@ render_cell(struct terminal *term, pixman_image_t *pix,
} }
else if (!term->window->is_fullscreen && term->colors.alpha != 0xffff) { else if (!term->window->is_fullscreen && term->colors.alpha != 0xffff) {
switch (term->conf->colors.alpha_mode) { switch (term->conf->colors_dark.alpha_mode) {
case ALPHA_MODE_DEFAULT: { case ALPHA_MODE_DEFAULT: {
if (cell->attrs.bg_src == COLOR_DEFAULT) { if (cell->attrs.bg_src == COLOR_DEFAULT) {
alpha = term->colors.alpha; alpha = term->colors.alpha;
@ -1175,8 +1175,8 @@ render_cell(struct terminal *term, pixman_image_t *pix,
if (unlikely(cell->attrs.url)) { if (unlikely(cell->attrs.url)) {
pixman_color_t url_color = color_hex_to_pixman( pixman_color_t url_color = color_hex_to_pixman(
term->conf->colors.use_custom.url term->conf->colors_dark.use_custom.url
? term->conf->colors.url ? term->conf->colors_dark.url
: term->colors.table[3], : term->colors.table[3],
gamma_correct); gamma_correct);
draw_underline(term, pix, font, &url_color, x, y, cell_cols); draw_underline(term, pix, font, &url_color, x, y, cell_cols);
@ -1991,8 +1991,8 @@ render_overlay(struct terminal *term)
case OVERLAY_FLASH: case OVERLAY_FLASH:
color = color_hex_to_pixman_with_alpha( color = color_hex_to_pixman_with_alpha(
term->conf->colors.flash, term->conf->colors_dark.flash,
term->conf->colors.flash_alpha, term->conf->colors_dark.flash_alpha,
wayl_do_linear_blending(term->wl, term->conf)); wayl_do_linear_blending(term->wl, term->conf));
break; break;
@ -2510,10 +2510,10 @@ render_csd_title(struct terminal *term, const struct csd_data *info,
uint32_t bg = term->conf->csd.color.title_set uint32_t bg = term->conf->csd.color.title_set
? term->conf->csd.color.title ? term->conf->csd.color.title
: 0xffu << 24 | term->conf->colors.fg; : 0xffu << 24 | term->conf->colors_dark.fg;
uint32_t fg = term->conf->csd.color.buttons_set uint32_t fg = term->conf->csd.color.buttons_set
? term->conf->csd.color.buttons ? term->conf->csd.color.buttons
: term->conf->colors.bg; : term->conf->colors_dark.bg;
if (!term->visual_focus) { if (!term->visual_focus) {
bg = color_dim(term, bg); bg = color_dim(term, bg);
@ -2607,7 +2607,7 @@ render_csd_border(struct terminal *term, enum csd_surface surf_idx,
uint32_t _color = uint32_t _color =
conf->csd.color.border_set ? conf->csd.color.border : conf->csd.color.border_set ? conf->csd.color.border :
conf->csd.color.title_set ? conf->csd.color.title : conf->csd.color.title_set ? conf->csd.color.title :
0xffu << 24 | term->conf->colors.fg; 0xffu << 24 | term->conf->colors_dark.fg;
if (!term->visual_focus) if (!term->visual_focus)
_color = color_dim(term, _color); _color = color_dim(term, _color);
@ -2627,7 +2627,7 @@ static pixman_color_t
get_csd_button_fg_color(const struct terminal *term) get_csd_button_fg_color(const struct terminal *term)
{ {
const struct config *conf = term->conf; const struct config *conf = term->conf;
uint32_t _color = conf->colors.bg; uint32_t _color = conf->colors_dark.bg;
uint16_t alpha = 0xffff; uint16_t alpha = 0xffff;
if (conf->csd.color.buttons_set) { if (conf->csd.color.buttons_set) {
@ -2872,7 +2872,7 @@ render_csd_button(struct terminal *term, enum csd_surface surf_idx,
switch (surf_idx) { switch (surf_idx) {
case CSD_SURF_MINIMIZE: case CSD_SURF_MINIMIZE:
_color = term->conf->colors.table[4]; /* blue */ _color = term->conf->colors_dark.table[4]; /* blue */
is_set = term->conf->csd.color.minimize_set; is_set = term->conf->csd.color.minimize_set;
conf_color = &term->conf->csd.color.minimize; conf_color = &term->conf->csd.color.minimize;
is_active = term->active_surface == TERM_SURF_BUTTON_MINIMIZE && is_active = term->active_surface == TERM_SURF_BUTTON_MINIMIZE &&
@ -2880,7 +2880,7 @@ render_csd_button(struct terminal *term, enum csd_surface surf_idx,
break; break;
case CSD_SURF_MAXIMIZE: case CSD_SURF_MAXIMIZE:
_color = term->conf->colors.table[2]; /* green */ _color = term->conf->colors_dark.table[2]; /* green */
is_set = term->conf->csd.color.maximize_set; is_set = term->conf->csd.color.maximize_set;
conf_color = &term->conf->csd.color.maximize; conf_color = &term->conf->csd.color.maximize;
is_active = term->active_surface == TERM_SURF_BUTTON_MAXIMIZE && is_active = term->active_surface == TERM_SURF_BUTTON_MAXIMIZE &&
@ -2888,7 +2888,7 @@ render_csd_button(struct terminal *term, enum csd_surface surf_idx,
break; break;
case CSD_SURF_CLOSE: case CSD_SURF_CLOSE:
_color = term->conf->colors.table[1]; /* red */ _color = term->conf->colors_dark.table[1]; /* red */
is_set = term->conf->csd.color.close_set; is_set = term->conf->csd.color.close_set;
conf_color = &term->conf->csd.color.quit; conf_color = &term->conf->csd.color.quit;
is_active = term->active_surface == TERM_SURF_BUTTON_CLOSE && is_active = term->active_surface == TERM_SURF_BUTTON_CLOSE &&
@ -3117,9 +3117,9 @@ render_scrollback_position(struct terminal *term)
uint32_t fg = term->colors.table[0]; uint32_t fg = term->colors.table[0];
uint32_t bg = term->colors.table[8 + 4]; uint32_t bg = term->colors.table[8 + 4];
if (term->conf->colors.use_custom.scrollback_indicator) { if (term->conf->colors_dark.use_custom.scrollback_indicator) {
fg = term->conf->colors.scrollback_indicator.fg; fg = term->conf->colors_dark.scrollback_indicator.fg;
bg = term->conf->colors.scrollback_indicator.bg; bg = term->conf->colors_dark.scrollback_indicator.bg;
} }
render_osd( render_osd(
@ -3799,18 +3799,18 @@ render_search_box(struct terminal *term)
const bool is_match = term->search.match_len == text_len; const bool is_match = term->search.match_len == text_len;
const bool custom_colors = is_match const bool custom_colors = is_match
? term->conf->colors.use_custom.search_box_match ? term->conf->colors_dark.use_custom.search_box_match
: term->conf->colors.use_custom.search_box_no_match; : term->conf->colors_dark.use_custom.search_box_no_match;
/* Background - yellow on empty/match, red on mismatch (default) */ /* Background - yellow on empty/match, red on mismatch (default) */
const bool gamma_correct = wayl_do_linear_blending(term->wl, term->conf); const bool gamma_correct = wayl_do_linear_blending(term->wl, term->conf);
const pixman_color_t color = color_hex_to_pixman( const pixman_color_t color = color_hex_to_pixman(
is_match is_match
? (custom_colors ? (custom_colors
? term->conf->colors.search_box.match.bg ? term->conf->colors_dark.search_box.match.bg
: term->colors.table[3]) : term->colors.table[3])
: (custom_colors : (custom_colors
? term->conf->colors.search_box.no_match.bg ? term->conf->colors_dark.search_box.no_match.bg
: term->colors.table[1]), : term->colors.table[1]),
gamma_correct); gamma_correct);
@ -3832,8 +3832,8 @@ render_search_box(struct terminal *term)
pixman_color_t fg = color_hex_to_pixman( pixman_color_t fg = color_hex_to_pixman(
custom_colors custom_colors
? (is_match ? (is_match
? term->conf->colors.search_box.match.fg ? term->conf->colors_dark.search_box.match.fg
: term->conf->colors.search_box.no_match.fg) : term->conf->colors_dark.search_box.no_match.fg)
: term->colors.table[0], : term->colors.table[0],
gamma_correct); gamma_correct);
@ -4254,11 +4254,11 @@ render_urls(struct terminal *term)
struct buffer *bufs[render_count]; struct buffer *bufs[render_count];
shm_get_many(chain, render_count, widths, heights, bufs, false); shm_get_many(chain, render_count, widths, heights, bufs, false);
uint32_t fg = term->conf->colors.use_custom.jump_label uint32_t fg = term->conf->colors_dark.use_custom.jump_label
? term->conf->colors.jump_label.fg ? term->conf->colors_dark.jump_label.fg
: term->colors.table[0]; : term->colors.table[0];
uint32_t bg = term->conf->colors.use_custom.jump_label uint32_t bg = term->conf->colors_dark.use_custom.jump_label
? term->conf->colors.jump_label.bg ? term->conf->colors_dark.jump_label.bg
: term->colors.table[3]; : term->colors.table[3];
for (size_t i = 0; i < render_count; i++) { for (size_t i = 0; i < render_count; i++) {

View file

@ -182,11 +182,11 @@ fdm_client(struct fdm *fdm, int fd, int events, void *data)
switch (sigusr.signo) { switch (sigusr.signo) {
case SIGUSR1: case SIGUSR1:
term_theme_switch_to_1(client->instance->terminal); term_theme_switch_to_dark(client->instance->terminal);
break; break;
case SIGUSR2: case SIGUSR2:
term_theme_switch_to_2(client->instance->terminal); term_theme_switch_to_light(client->instance->terminal);
break; break;
default: default:
@ -670,21 +670,21 @@ server_destroy(struct server *server)
} }
void void
server_global_theme_switch_to_1(struct server *server) server_global_theme_switch_to_dark(struct server *server)
{ {
server->conf->initial_color_theme = COLOR_THEME1; server->conf->initial_color_theme = COLOR_THEME_DARK;
tll_foreach(server->clients, it) tll_foreach(server->clients, it)
term_theme_switch_to_1(it->item->instance->terminal); term_theme_switch_to_dark(it->item->instance->terminal);
tll_foreach(server->terminals, it) tll_foreach(server->terminals, it)
term_theme_switch_to_1(it->item->terminal); term_theme_switch_to_dark(it->item->terminal);
} }
void void
server_global_theme_switch_to_2(struct server *server) server_global_theme_switch_to_light(struct server *server)
{ {
server->conf->initial_color_theme = COLOR_THEME2; server->conf->initial_color_theme = COLOR_THEME_LIGHT;
tll_foreach(server->clients, it) tll_foreach(server->clients, it)
term_theme_switch_to_2(it->item->instance->terminal); term_theme_switch_to_light(it->item->instance->terminal);
tll_foreach(server->terminals, it) tll_foreach(server->terminals, it)
term_theme_switch_to_2(it->item->terminal); term_theme_switch_to_light(it->item->terminal);
} }

View file

@ -10,5 +10,5 @@ struct server *server_init(struct config *conf, struct fdm *fdm,
struct reaper *reaper, struct wayland *wayl); struct reaper *reaper, struct wayland *wayl);
void server_destroy(struct server *server); void server_destroy(struct server *server);
void server_global_theme_switch_to_1(struct server *server); void server_global_theme_switch_to_dark(struct server *server);
void server_global_theme_switch_to_2(struct server *server); void server_global_theme_switch_to_light(struct server *server);

View file

@ -137,7 +137,7 @@ sixel_init(struct terminal *term, int p1, int p2, int p3)
} }
const size_t active_palette_entries = min( const size_t active_palette_entries = min(
ALEN(term->conf->colors.sixel), term->sixel.palette_size); ALEN(term->conf->colors_dark.sixel), term->sixel.palette_size);
if (term->sixel.use_private_palette) { if (term->sixel.use_private_palette) {
xassert(term->sixel.private_palette == NULL); xassert(term->sixel.private_palette == NULL);
@ -145,7 +145,7 @@ sixel_init(struct terminal *term, int p1, int p2, int p3)
term->sixel.palette_size, sizeof(term->sixel.private_palette[0])); term->sixel.palette_size, sizeof(term->sixel.private_palette[0]));
memcpy( memcpy(
term->sixel.private_palette, term->conf->colors.sixel, term->sixel.private_palette, term->conf->colors_dark.sixel,
active_palette_entries * sizeof(term->sixel.private_palette[0])); active_palette_entries * sizeof(term->sixel.private_palette[0]));
if (term->sixel.linear_blending || term->sixel.use_10bit) { if (term->sixel.linear_blending || term->sixel.use_10bit) {
@ -164,7 +164,7 @@ sixel_init(struct terminal *term, int p1, int p2, int p3)
term->sixel.palette_size, sizeof(term->sixel.shared_palette[0])); term->sixel.palette_size, sizeof(term->sixel.shared_palette[0]));
memcpy( memcpy(
term->sixel.shared_palette, term->conf->colors.sixel, term->sixel.shared_palette, term->conf->colors_dark.sixel,
active_palette_entries * sizeof(term->sixel.shared_palette[0])); active_palette_entries * sizeof(term->sixel.shared_palette[0]));
if (term->sixel.linear_blending || term->sixel.use_10bit) { if (term->sixel.linear_blending || term->sixel.use_10bit) {

View file

@ -1271,8 +1271,10 @@ term_init(const struct config *conf, struct fdm *fdm, struct reaper *reaper,
const struct color_theme *theme = NULL; const struct color_theme *theme = NULL;
switch (conf->initial_color_theme) { switch (conf->initial_color_theme) {
case COLOR_THEME1: theme = &conf->colors; break; case COLOR_THEME_DARK: theme = &conf->colors_dark; break;
case COLOR_THEME2: theme = &conf->colors2; break; case COLOR_THEME_LIGHT: theme = &conf->colors_light; break;
case COLOR_THEME_1: BUG("COLOR_THEME_1 should not be used"); break;
case COLOR_THEME_2: BUG("COLOR_THEME_2 should not be used"); break;
} }
/* Initialize configure-based terminal attributes */ /* Initialize configure-based terminal attributes */
@ -2177,8 +2179,10 @@ term_reset(struct terminal *term, bool hard)
const struct color_theme *theme = NULL; const struct color_theme *theme = NULL;
switch (term->conf->initial_color_theme) { switch (term->conf->initial_color_theme) {
case COLOR_THEME1: theme = &term->conf->colors; break; case COLOR_THEME_DARK: theme = &term->conf->colors_dark; break;
case COLOR_THEME2: theme = &term->conf->colors2; break; case COLOR_THEME_LIGHT: theme = &term->conf->colors_light; break;
case COLOR_THEME_1: BUG("COLOR_THEME_1 should not be used"); break;
case COLOR_THEME_2: BUG("COLOR_THEME_2 should not be used"); break;
} }
term->flash.active = false; term->flash.active = false;
@ -4742,13 +4746,13 @@ term_send_size_notification(struct terminal *term)
} }
void void
term_theme_switch_to_1(struct terminal *term) term_theme_switch_to_dark(struct terminal *term)
{ {
if (term->colors.active_theme == COLOR_THEME1) if (term->colors.active_theme == COLOR_THEME_DARK)
return; return;
term_theme_apply(term, &term->conf->colors); term_theme_apply(term, &term->conf->colors_dark);
term->colors.active_theme = COLOR_THEME1; term->colors.active_theme = COLOR_THEME_DARK;
wayl_win_alpha_changed(term->window); wayl_win_alpha_changed(term->window);
term_font_subpixel_changed(term); term_font_subpixel_changed(term);
@ -4762,13 +4766,13 @@ term_theme_switch_to_1(struct terminal *term)
} }
void void
term_theme_switch_to_2(struct terminal *term) term_theme_switch_to_light(struct terminal *term)
{ {
if (term->colors.active_theme == COLOR_THEME2) if (term->colors.active_theme == COLOR_THEME_LIGHT)
return; return;
term_theme_apply(term, &term->conf->colors2); term_theme_apply(term, &term->conf->colors_light);
term->colors.active_theme = COLOR_THEME2; term->colors.active_theme = COLOR_THEME_LIGHT;
wayl_win_alpha_changed(term->window); wayl_win_alpha_changed(term->window);
term_font_subpixel_changed(term); term_font_subpixel_changed(term);
@ -4784,15 +4788,15 @@ term_theme_switch_to_2(struct terminal *term)
void void
term_theme_toggle(struct terminal *term) term_theme_toggle(struct terminal *term)
{ {
if (term->colors.active_theme == COLOR_THEME1) { if (term->colors.active_theme == COLOR_THEME_DARK) {
term_theme_apply(term, &term->conf->colors2); term_theme_apply(term, &term->conf->colors_light);
term->colors.active_theme = COLOR_THEME2; term->colors.active_theme = COLOR_THEME_LIGHT;
if (term->report_theme_changes) if (term->report_theme_changes)
term_to_slave(term, "\033[?997;2n", 9); term_to_slave(term, "\033[?997;2n", 9);
} else { } else {
term_theme_apply(term, &term->conf->colors); term_theme_apply(term, &term->conf->colors_dark);
term->colors.active_theme = COLOR_THEME1; term->colors.active_theme = COLOR_THEME_DARK;
if (term->report_theme_changes) if (term->report_theme_changes)
term_to_slave(term, "\033[?997;1n", 9); term_to_slave(term, "\033[?997;1n", 9);

View file

@ -994,8 +994,8 @@ void term_enable_size_notifications(struct terminal *term);
void term_disable_size_notifications(struct terminal *term); void term_disable_size_notifications(struct terminal *term);
void term_send_size_notification(struct terminal *term); void term_send_size_notification(struct terminal *term);
void term_theme_switch_to_1(struct terminal *term); void term_theme_switch_to_dark(struct terminal *term);
void term_theme_switch_to_2(struct terminal *term); void term_theme_switch_to_light(struct terminal *term);
void term_theme_toggle(struct terminal *term); void term_theme_toggle(struct terminal *term);
static inline void term_reset_grapheme_state(struct terminal *term) static inline void term_reset_grapheme_state(struct terminal *term)

View file

@ -521,6 +521,14 @@ test_section_main(void)
(int []){STARTUP_WINDOWED, STARTUP_MAXIMIZED, STARTUP_FULLSCREEN}, (int []){STARTUP_WINDOWED, STARTUP_MAXIMIZED, STARTUP_FULLSCREEN},
(int *)&conf.startup_mode); (int *)&conf.startup_mode);
test_enum(
&ctx, &parse_section_main, "initial-color-theme",
2,
(const char *[]){"dark", "light", "1", "2"},
(int []){COLOR_THEME_DARK, COLOR_THEME_LIGHT,
COLOR_THEME_DARK, COLOR_THEME_LIGHT},
(int *)&conf.initial_color_theme);
/* TODO: font (custom) */ /* TODO: font (custom) */
/* TODO: include (custom) */ /* TODO: include (custom) */
/* TODO: bold-text-in-bright (enum/boolean) */ /* TODO: bold-text-in-bright (enum/boolean) */
@ -695,78 +703,157 @@ test_section_touch(void)
} }
static void static void
test_section_colors(void) test_section_colors_dark(void)
{ {
struct config conf = {0}; struct config conf = {0};
struct context ctx = { struct context ctx = {
.conf = &conf, .section = "colors", .path = "unittest"}; .conf = &conf, .section = "colors-dark", .path = "unittest"};
test_invalid_key(&ctx, &parse_section_colors, "invalid-key"); test_invalid_key(&ctx, &parse_section_colors, "invalid-key");
test_color(&ctx, &parse_section_colors, "foreground", false, &conf.colors.fg); test_color(&ctx, &parse_section_colors_dark, "foreground", false, &conf.colors_dark.fg);
test_color(&ctx, &parse_section_colors, "background", false, &conf.colors.bg); test_color(&ctx, &parse_section_colors_dark, "background", false, &conf.colors_dark.bg);
test_color(&ctx, &parse_section_colors, "regular0", false, &conf.colors.table[0]); test_color(&ctx, &parse_section_colors_dark, "regular0", false, &conf.colors_dark.table[0]);
test_color(&ctx, &parse_section_colors, "regular1", false, &conf.colors.table[1]); test_color(&ctx, &parse_section_colors_dark, "regular1", false, &conf.colors_dark.table[1]);
test_color(&ctx, &parse_section_colors, "regular2", false, &conf.colors.table[2]); test_color(&ctx, &parse_section_colors_dark, "regular2", false, &conf.colors_dark.table[2]);
test_color(&ctx, &parse_section_colors, "regular3", false, &conf.colors.table[3]); test_color(&ctx, &parse_section_colors_dark, "regular3", false, &conf.colors_dark.table[3]);
test_color(&ctx, &parse_section_colors, "regular4", false, &conf.colors.table[4]); test_color(&ctx, &parse_section_colors_dark, "regular4", false, &conf.colors_dark.table[4]);
test_color(&ctx, &parse_section_colors, "regular5", false, &conf.colors.table[5]); test_color(&ctx, &parse_section_colors_dark, "regular5", false, &conf.colors_dark.table[5]);
test_color(&ctx, &parse_section_colors, "regular6", false, &conf.colors.table[6]); test_color(&ctx, &parse_section_colors_dark, "regular6", false, &conf.colors_dark.table[6]);
test_color(&ctx, &parse_section_colors, "regular7", false, &conf.colors.table[7]); test_color(&ctx, &parse_section_colors_dark, "regular7", false, &conf.colors_dark.table[7]);
test_color(&ctx, &parse_section_colors, "bright0", false, &conf.colors.table[8]); test_color(&ctx, &parse_section_colors_dark, "bright0", false, &conf.colors_dark.table[8]);
test_color(&ctx, &parse_section_colors, "bright1", false, &conf.colors.table[9]); test_color(&ctx, &parse_section_colors_dark, "bright1", false, &conf.colors_dark.table[9]);
test_color(&ctx, &parse_section_colors, "bright2", false, &conf.colors.table[10]); test_color(&ctx, &parse_section_colors_dark, "bright2", false, &conf.colors_dark.table[10]);
test_color(&ctx, &parse_section_colors, "bright3", false, &conf.colors.table[11]); test_color(&ctx, &parse_section_colors_dark, "bright3", false, &conf.colors_dark.table[11]);
test_color(&ctx, &parse_section_colors, "bright4", false, &conf.colors.table[12]); test_color(&ctx, &parse_section_colors_dark, "bright4", false, &conf.colors_dark.table[12]);
test_color(&ctx, &parse_section_colors, "bright5", false, &conf.colors.table[13]); test_color(&ctx, &parse_section_colors_dark, "bright5", false, &conf.colors_dark.table[13]);
test_color(&ctx, &parse_section_colors, "bright6", false, &conf.colors.table[14]); test_color(&ctx, &parse_section_colors_dark, "bright6", false, &conf.colors_dark.table[14]);
test_color(&ctx, &parse_section_colors, "bright7", false, &conf.colors.table[15]); test_color(&ctx, &parse_section_colors_dark, "bright7", false, &conf.colors_dark.table[15]);
test_color(&ctx, &parse_section_colors, "dim0", false, &conf.colors.dim[0]); test_color(&ctx, &parse_section_colors_dark, "dim0", false, &conf.colors_dark.dim[0]);
test_color(&ctx, &parse_section_colors, "dim1", false, &conf.colors.dim[1]); test_color(&ctx, &parse_section_colors_dark, "dim1", false, &conf.colors_dark.dim[1]);
test_color(&ctx, &parse_section_colors, "dim2", false, &conf.colors.dim[2]); test_color(&ctx, &parse_section_colors_dark, "dim2", false, &conf.colors_dark.dim[2]);
test_color(&ctx, &parse_section_colors, "dim3", false, &conf.colors.dim[3]); test_color(&ctx, &parse_section_colors_dark, "dim3", false, &conf.colors_dark.dim[3]);
test_color(&ctx, &parse_section_colors, "dim4", false, &conf.colors.dim[4]); test_color(&ctx, &parse_section_colors_dark, "dim4", false, &conf.colors_dark.dim[4]);
test_color(&ctx, &parse_section_colors, "dim5", false, &conf.colors.dim[5]); test_color(&ctx, &parse_section_colors_dark, "dim5", false, &conf.colors_dark.dim[5]);
test_color(&ctx, &parse_section_colors, "dim6", false, &conf.colors.dim[6]); test_color(&ctx, &parse_section_colors_dark, "dim6", false, &conf.colors_dark.dim[6]);
test_color(&ctx, &parse_section_colors, "dim7", false, &conf.colors.dim[7]); test_color(&ctx, &parse_section_colors_dark, "dim7", false, &conf.colors_dark.dim[7]);
test_color(&ctx, &parse_section_colors, "selection-foreground", false, &conf.colors.selection_fg); test_color(&ctx, &parse_section_colors_dark, "selection-foreground", false, &conf.colors_dark.selection_fg);
test_color(&ctx, &parse_section_colors, "selection-background", false, &conf.colors.selection_bg); test_color(&ctx, &parse_section_colors_dark, "selection-background", false, &conf.colors_dark.selection_bg);
test_color(&ctx, &parse_section_colors, "urls", false, &conf.colors.url); test_color(&ctx, &parse_section_colors_dark, "urls", false, &conf.colors_dark.url);
test_two_colors(&ctx, &parse_section_colors, "jump-labels", false, test_two_colors(&ctx, &parse_section_colors_dark, "jump-labels", false,
&conf.colors.jump_label.fg, &conf.colors_dark.jump_label.fg,
&conf.colors.jump_label.bg); &conf.colors_dark.jump_label.bg);
test_two_colors(&ctx, &parse_section_colors, "scrollback-indicator", false, test_two_colors(&ctx, &parse_section_colors_dark, "scrollback-indicator", false,
&conf.colors.scrollback_indicator.fg, &conf.colors_dark.scrollback_indicator.fg,
&conf.colors.scrollback_indicator.bg); &conf.colors_dark.scrollback_indicator.bg);
test_two_colors(&ctx, &parse_section_colors, "search-box-no-match", false, test_two_colors(&ctx, &parse_section_colors_dark, "search-box-no-match", false,
&conf.colors.search_box.no_match.fg, &conf.colors_dark.search_box.no_match.fg,
&conf.colors.search_box.no_match.bg); &conf.colors_dark.search_box.no_match.bg);
test_two_colors(&ctx, &parse_section_colors, "search-box-match", false, test_two_colors(&ctx, &parse_section_colors_dark, "search-box-match", false,
&conf.colors.search_box.match.fg, &conf.colors_dark.search_box.match.fg,
&conf.colors.search_box.match.bg); &conf.colors_dark.search_box.match.bg);
test_two_colors(&ctx, &parse_section_colors, "cursor", false, test_two_colors(&ctx, &parse_section_colors_dark, "cursor", false,
&conf.colors.cursor.text, &conf.colors_dark.cursor.text,
&conf.colors.cursor.cursor); &conf.colors_dark.cursor.cursor);
test_enum(&ctx, &parse_section_colors, "alpha-mode", 3, test_enum(&ctx, &parse_section_colors_dark, "alpha-mode", 3,
(const char *[]){"default", "matching", "all"}, (const char *[]){"default", "matching", "all"},
(int []){ALPHA_MODE_DEFAULT, ALPHA_MODE_MATCHING, ALPHA_MODE_ALL}, (int []){ALPHA_MODE_DEFAULT, ALPHA_MODE_MATCHING, ALPHA_MODE_ALL},
(int *)&conf.colors.alpha_mode); (int *)&conf.colors_dark.alpha_mode);
test_enum(&ctx, &parse_section_colors, "dim-blend-towards", 2, test_enum(&ctx, &parse_section_colors_dark, "dim-blend-towards", 2,
(const char *[]){"black", "white"}, (const char *[]){"black", "white"},
(int []){DIM_BLEND_TOWARDS_BLACK, DIM_BLEND_TOWARDS_WHITE}, (int []){DIM_BLEND_TOWARDS_BLACK, DIM_BLEND_TOWARDS_WHITE},
(int *)&conf.colors.dim_blend_towards); (int *)&conf.colors_dark.dim_blend_towards);
for (size_t i = 0; i < 255; i++) { for (size_t i = 0; i < 255; i++) {
char key_name[4]; char key_name[4];
sprintf(key_name, "%zu", i); sprintf(key_name, "%zu", i);
test_color(&ctx, &parse_section_colors, key_name, false, test_color(&ctx, &parse_section_colors_dark, key_name, false,
&conf.colors.table[i]); &conf.colors_dark.table[i]);
} }
test_invalid_key(&ctx, &parse_section_colors, "256"); test_invalid_key(&ctx, &parse_section_colors_dark, "256");
/* TODO: alpha (float in range 0-1, converted to uint16_t) */
config_free(&conf);
}
static void
test_section_colors_light(void)
{
struct config conf = {0};
struct context ctx = {
.conf = &conf, .section = "colors-light", .path = "unittest"};
test_invalid_key(&ctx, &parse_section_colors, "invalid-key");
test_color(&ctx, &parse_section_colors_light, "foreground", false, &conf.colors_light.fg);
test_color(&ctx, &parse_section_colors_light, "background", false, &conf.colors_light.bg);
test_color(&ctx, &parse_section_colors_light, "regular0", false, &conf.colors_light.table[0]);
test_color(&ctx, &parse_section_colors_light, "regular1", false, &conf.colors_light.table[1]);
test_color(&ctx, &parse_section_colors_light, "regular2", false, &conf.colors_light.table[2]);
test_color(&ctx, &parse_section_colors_light, "regular3", false, &conf.colors_light.table[3]);
test_color(&ctx, &parse_section_colors_light, "regular4", false, &conf.colors_light.table[4]);
test_color(&ctx, &parse_section_colors_light, "regular5", false, &conf.colors_light.table[5]);
test_color(&ctx, &parse_section_colors_light, "regular6", false, &conf.colors_light.table[6]);
test_color(&ctx, &parse_section_colors_light, "regular7", false, &conf.colors_light.table[7]);
test_color(&ctx, &parse_section_colors_light, "bright0", false, &conf.colors_light.table[8]);
test_color(&ctx, &parse_section_colors_light, "bright1", false, &conf.colors_light.table[9]);
test_color(&ctx, &parse_section_colors_light, "bright2", false, &conf.colors_light.table[10]);
test_color(&ctx, &parse_section_colors_light, "bright3", false, &conf.colors_light.table[11]);
test_color(&ctx, &parse_section_colors_light, "bright4", false, &conf.colors_light.table[12]);
test_color(&ctx, &parse_section_colors_light, "bright5", false, &conf.colors_light.table[13]);
test_color(&ctx, &parse_section_colors_light, "bright6", false, &conf.colors_light.table[14]);
test_color(&ctx, &parse_section_colors_light, "bright7", false, &conf.colors_light.table[15]);
test_color(&ctx, &parse_section_colors_light, "dim0", false, &conf.colors_light.dim[0]);
test_color(&ctx, &parse_section_colors_light, "dim1", false, &conf.colors_light.dim[1]);
test_color(&ctx, &parse_section_colors_light, "dim2", false, &conf.colors_light.dim[2]);
test_color(&ctx, &parse_section_colors_light, "dim3", false, &conf.colors_light.dim[3]);
test_color(&ctx, &parse_section_colors_light, "dim4", false, &conf.colors_light.dim[4]);
test_color(&ctx, &parse_section_colors_light, "dim5", false, &conf.colors_light.dim[5]);
test_color(&ctx, &parse_section_colors_light, "dim6", false, &conf.colors_light.dim[6]);
test_color(&ctx, &parse_section_colors_light, "dim7", false, &conf.colors_light.dim[7]);
test_color(&ctx, &parse_section_colors_light, "selection-foreground", false, &conf.colors_light.selection_fg);
test_color(&ctx, &parse_section_colors_light, "selection-background", false, &conf.colors_light.selection_bg);
test_color(&ctx, &parse_section_colors_light, "urls", false, &conf.colors_light.url);
test_two_colors(&ctx, &parse_section_colors_light, "jump-labels", false,
&conf.colors_light.jump_label.fg,
&conf.colors_light.jump_label.bg);
test_two_colors(&ctx, &parse_section_colors_light, "scrollback-indicator", false,
&conf.colors_light.scrollback_indicator.fg,
&conf.colors_light.scrollback_indicator.bg);
test_two_colors(&ctx, &parse_section_colors_light, "search-box-no-match", false,
&conf.colors_light.search_box.no_match.fg,
&conf.colors_light.search_box.no_match.bg);
test_two_colors(&ctx, &parse_section_colors_light, "search-box-match", false,
&conf.colors_light.search_box.match.fg,
&conf.colors_light.search_box.match.bg);
test_two_colors(&ctx, &parse_section_colors_light, "cursor", false,
&conf.colors_light.cursor.text,
&conf.colors_light.cursor.cursor);
test_enum(&ctx, &parse_section_colors_light, "alpha-mode", 3,
(const char *[]){"default", "matching", "all"},
(int []){ALPHA_MODE_DEFAULT, ALPHA_MODE_MATCHING, ALPHA_MODE_ALL},
(int *)&conf.colors_light.alpha_mode);
test_enum(&ctx, &parse_section_colors_light, "dim-blend-towards", 2,
(const char *[]){"black", "white"},
(int []){DIM_BLEND_TOWARDS_BLACK, DIM_BLEND_TOWARDS_WHITE},
(int *)&conf.colors_light.dim_blend_towards);
for (size_t i = 0; i < 255; i++) {
char key_name[4];
sprintf(key_name, "%zu", i);
test_color(&ctx, &parse_section_colors_light, key_name, false,
&conf.colors_light.table[i]);
}
test_invalid_key(&ctx, &parse_section_colors_light, "256");
/* TODO: alpha (float in range 0-1, converted to uint16_t) */ /* TODO: alpha (float in range 0-1, converted to uint16_t) */
@ -1444,7 +1531,8 @@ main(int argc, const char *const *argv)
test_section_cursor(); test_section_cursor();
test_section_mouse(); test_section_mouse();
test_section_touch(); test_section_touch();
test_section_colors(); test_section_colors_dark();
test_section_colors_light();
test_section_csd(); test_section_csd();
test_section_key_bindings(); test_section_key_bindings();
test_section_key_bindings_collisions(); test_section_key_bindings_collisions();

View file

@ -1,7 +1,7 @@
# -*- conf -*- # -*- conf -*-
# Aero root theme # Aero root theme
[colors] [colors-dark]
cursor=1a1a1a 9fd5f5 cursor=1a1a1a 9fd5f5
foreground=dedeef foreground=dedeef
background=1a1a1a background=1a1a1a

View file

@ -1,7 +1,7 @@
# -*- conf -*- # -*- conf -*-
# Alacritty # Alacritty
[colors] [colors-dark]
cursor = 181818 56d8c9 cursor = 181818 56d8c9
background= 181818 background= 181818
foreground= d8d8d8 foreground= d8d8d8

View file

@ -1,7 +1,7 @@
# -*- conf -*- # -*- conf -*-
# https://github.com/romainl/Apprentice # https://github.com/romainl/Apprentice
[colors] [colors-dark]
cursor=262626 6c6c6c cursor=262626 6c6c6c
foreground=bcbcbc foreground=bcbcbc
background=262626 background=262626

View file

@ -2,7 +2,7 @@
# theme: Ayu Mirage # theme: Ayu Mirage
# description: a theme based on Ayu Mirage for Sublime Text (original: https://github.com/dempfi/ayu) # description: a theme based on Ayu Mirage for Sublime Text (original: https://github.com/dempfi/ayu)
[colors] [colors-dark]
cursor = ffcc66 665a44 cursor = ffcc66 665a44
foreground = cccac2 foreground = cccac2
background = 242936 background = 242936

View file

@ -1,7 +1,7 @@
# _*_ conf _*_ # _*_ conf _*_
# Catppuccin Frappe # Catppuccin Frappe
[colors] [colors-dark]
foreground=c6d0f5 foreground=c6d0f5
background=303446 background=303446

View file

@ -1,7 +1,10 @@
# _*_ conf _*_ # _*_ conf _*_
# Catppuccin Latte # Catppuccin Latte
[colors] [main]
initial-color-theme=light
[colors-light]
foreground=4c4f69 foreground=4c4f69
background=eff1f5 background=eff1f5

View file

@ -1,7 +1,7 @@
# _*_ conf _*_ # _*_ conf _*_
# Catppuccin Macchiato # Catppuccin Macchiato
[colors] [colors-dark]
foreground=cad3f5 foreground=cad3f5
background=24273a background=24273a

View file

@ -1,7 +1,7 @@
# _*_ conf _*_ # _*_ conf _*_
# Catppuccin Mocha # Catppuccin Mocha
[colors] [colors-dark]
foreground=cdd6f4 foreground=cdd6f4
background=1e1e2e background=1e1e2e

View file

@ -3,7 +3,7 @@
# author: ayushnix (https://sr.ht/~ayushnix) # author: ayushnix (https://sr.ht/~ayushnix)
# description: A dark theme with bright cyberpunk colors (WCAG AAA compliant) # description: A dark theme with bright cyberpunk colors (WCAG AAA compliant)
[colors] [colors-dark]
cursor = 181818 cdcdcd cursor = 181818 cdcdcd
foreground = cdcdcd foreground = cdcdcd
background = 181818 background = 181818

View file

@ -1,7 +1,7 @@
# -*- conf -*- # -*- conf -*-
# Derp # Derp
[colors] [colors-dark]
cursor=000000 ffffff cursor=000000 ffffff
foreground=ffffff foreground=ffffff
background=000000 background=000000

View file

@ -2,7 +2,7 @@
# Deus # Deus
# Color palette based on: https://github.com/ajmwagar/vim-deus # Color palette based on: https://github.com/ajmwagar/vim-deus
[colors] [colors-dark]
cursor=2c323b eaeaea cursor=2c323b eaeaea
background=2c323b background=2c323b
foreground=eaeaea foreground=eaeaea

View file

@ -1,7 +1,7 @@
# -*- conf -*- # -*- conf -*-
# Dracula # Dracula
[colors] [colors-dark]
cursor=282a36 f8f8f2 cursor=282a36 f8f8f2
foreground=f8f8f2 foreground=f8f8f2
background=282a36 background=282a36

View file

@ -1,7 +1,7 @@
# -*- conf -*- # -*- conf -*-
# Dracula iTerm2 variant # Dracula iTerm2 variant
[colors] [colors-dark]
cursor=ffffff bbbbbb cursor=ffffff bbbbbb
foreground=f8f8f2 foreground=f8f8f2
background=1e1f29 background=1e1f29

View file

@ -5,7 +5,10 @@
# text and the white background. # text and the white background.
# author: Eugen Rahaian <eugen@rah.ro> # author: Eugen Rahaian <eugen@rah.ro>
[colors] [main]
initial-color-theme=light
[colors-light]
cursor=ffffff 515151 cursor=ffffff 515151
background= ffffff background= ffffff
foreground= 000000 foreground= 000000

View file

@ -1,7 +1,7 @@
# -*- conf -*- # -*- conf -*-
# Gruvbox # Gruvbox
[colors] [colors-dark]
background=282828 background=282828
foreground=ebdbb2 foreground=ebdbb2
regular0=282828 regular0=282828
@ -21,7 +21,7 @@ bright5=d3869b
bright6=8ec07c bright6=8ec07c
bright7=ebdbb2 bright7=ebdbb2
[colors2] [colors-light]
background=fbf1c7 background=fbf1c7
foreground=3c3836 foreground=3c3836
regular0=fbf1c7 regular0=fbf1c7

View file

@ -1,7 +1,7 @@
# -*- conf -*- # -*- conf -*-
# Gruvbox # Gruvbox
[colors] [colors-dark]
background=282828 background=282828
foreground=ebdbb2 foreground=ebdbb2
regular0=282828 regular0=282828

View file

@ -1,7 +1,10 @@
# -*- conf -*- # -*- conf -*-
# Gruvbox - Light # Gruvbox - Light
[colors] [main]
initial-color-theme=light
[colors-light]
background=fbf1c7 background=fbf1c7
foreground=3c3836 foreground=3c3836
regular0=fbf1c7 regular0=fbf1c7

View file

@ -1,6 +1,6 @@
# -*- conf -*- # -*- conf -*-
[colors] [colors-dark]
cursor=141414 c9c9c9 cursor=141414 c9c9c9
foreground=c9c9c9 foreground=c9c9c9
background=141414 background=141414

View file

@ -2,7 +2,7 @@
# this foot theme is based on alacritty iterm theme: # this foot theme is based on alacritty iterm theme:
# https://github.com/alacritty/alacritty-theme/blob/master/themes/iterm.toml # https://github.com/alacritty/alacritty-theme/blob/master/themes/iterm.toml
[colors] [colors-dark]
foreground=fffbf6 foreground=fffbf6
background=101421 background=101421

View file

@ -2,7 +2,7 @@
# JetBrains Darcula # JetBrains Darcula
# Palette based on the same theme from https://github.com/dexpota/kitty-themes # Palette based on the same theme from https://github.com/dexpota/kitty-themes
[colors] [colors-dark]
cursor=202020 ffffff cursor=202020 ffffff
background=202020 background=202020
foreground=adadad foreground=adadad

View file

@ -1,6 +1,6 @@
# -*- conf -*- # -*- conf -*-
[colors] [colors-dark]
cursor=111111 cccccc cursor=111111 cccccc
foreground=dddddd foreground=dddddd
background=000000 background=000000

View file

@ -2,7 +2,10 @@
# Material Amber # Material Amber
# Based on material.io guidelines with Amber 50 background # Based on material.io guidelines with Amber 50 background
[colors] [main]
initial-color-theme=light
[colors-light]
cursor=fff8e1 21201d cursor=fff8e1 21201d
foreground = 21201d foreground = 21201d
background = fff8e1 background = fff8e1

View file

@ -2,7 +2,7 @@
# Material # Material
# From https://github.com/MartinSeeler/iterm2-material-design # From https://github.com/MartinSeeler/iterm2-material-design
[colors] [colors-dark]
foreground=ECEFF1 foreground=ECEFF1
background=263238 background=263238
regular0=546E7A # black regular0=546E7A # black

View file

@ -3,7 +3,11 @@
# modus-operandi # modus-operandi
# See: https://protesilaos.com/emacs/modus-themes # See: https://protesilaos.com/emacs/modus-themes
# #
[colors]
[main]
initial-color-theme=light
[colors-light]
background=ffffff background=ffffff
foreground=000000 foreground=000000
regular0=000000 regular0=000000

View file

@ -4,7 +4,7 @@
# See: https://protesilaos.com/emacs/modus-themes # See: https://protesilaos.com/emacs/modus-themes
# #
[colors] [colors-dark]
background=000000 background=000000
foreground=ffffff foreground=ffffff
regular0=000000 regular0=000000

View file

@ -4,7 +4,7 @@
# See: https://protesilaos.com/emacs/modus-themes # See: https://protesilaos.com/emacs/modus-themes
# #
[colors] [colors-dark]
background=0d0e1c background=0d0e1c
foreground=ffffff foreground=ffffff
regular0=000000 regular0=000000

View file

@ -2,7 +2,7 @@
# Molokai # Molokai
# Based on zhou13's at https://github.com/zhou13/molokai-terminal/blob/master/xterm/Xresources # Based on zhou13's at https://github.com/zhou13/molokai-terminal/blob/master/xterm/Xresources
[colors] [colors-dark]
background=1B1D1E background=1B1D1E
foreground=CCCCCC foreground=CCCCCC
regular0=1B1D1E regular0=1B1D1E

View file

@ -1,7 +1,7 @@
# -*- conf -*- # -*- conf -*-
# Monokai Pro # Monokai Pro
[colors] [colors-dark]
background=2D2A2E background=2D2A2E
foreground=FCFCFA foreground=FCFCFA
regular0=403E41 regular0=403E41

View file

@ -2,7 +2,7 @@
# moonfly # moonfly
# Based on https://github.com/bluz71/vim-moonfly-colors # Based on https://github.com/bluz71/vim-moonfly-colors
[colors] [colors-dark]
cursor = 080808 9e9e9e cursor = 080808 9e9e9e
foreground = b2b2b2 foreground = b2b2b2
background = 080808 background = 080808

View file

@ -6,7 +6,7 @@
# https://xcolors.net/neon # https://xcolors.net/neon
# #
[colors] [colors-dark]
foreground=f8f8f8 foreground=f8f8f8
background=171717 background=171717
regular0=171717 regular0=171717

View file

@ -1,7 +1,7 @@
# _*_ conf _*_ # _*_ conf _*_
# Night Owl # Night Owl
[colors] [colors-dark]
cursor=011627 80a4c2 cursor=011627 80a4c2
foreground=d6deeb foreground=d6deeb
background=011627 background=011627

View file

@ -2,7 +2,7 @@
# nightfly # nightfly
# Based on https://github.com/bluz71/vim-nightfly-guicolors # Based on https://github.com/bluz71/vim-nightfly-guicolors
[colors] [colors-dark]
cursor = 080808 9ca1aa cursor = 080808 9ca1aa
foreground = acb4c2 foreground = acb4c2
background = 011627 background = 011627

View file

@ -3,7 +3,7 @@
# https://github.com/n1ghtmare/noirblaze-kitty # https://github.com/n1ghtmare/noirblaze-kitty
[colors] [colors-dark]
cursor=121212 ff0088 cursor=121212 ff0088
foreground=d5d5d5 foreground=d5d5d5
background=121212 background=121212

View file

@ -6,7 +6,7 @@
# this specific foot theme is based on nord-alacritty: # this specific foot theme is based on nord-alacritty:
# https://github.com/arcticicestudio/nord-alacritty/blob/develop/src/nord.yml # https://github.com/arcticicestudio/nord-alacritty/blob/develop/src/nord.yml
[colors] [colors-dark]
cursor = 2e3440 d8dee9 cursor = 2e3440 d8dee9
foreground = d8dee9 foreground = d8dee9
background = 2e3440 background = 2e3440

View file

@ -1,7 +1,7 @@
# -*- conf -*- # -*- conf -*-
# Nordiq # Nordiq
[colors] [colors-dark]
cursor=eeeeee 9f515a cursor=eeeeee 9f515a
foreground=dbdee9 foreground=dbdee9
background=0e1420 background=0e1420

View file

@ -3,7 +3,7 @@
# Uses the dark color palette from the default Neovim color scheme # Uses the dark color palette from the default Neovim color scheme
# See: https://github.com/neovim/neovim/blob/fb6c059dc55c8d594102937be4dd70f5ff51614a/src/nvim/highlight_group.c#L419 # See: https://github.com/neovim/neovim/blob/fb6c059dc55c8d594102937be4dd70f5ff51614a/src/nvim/highlight_group.c#L419
[colors] [colors-dark]
cursor=14161b e0e2ea # NvimDarkGrey2 NvimLightGrey2 cursor=14161b e0e2ea # NvimDarkGrey2 NvimLightGrey2
foreground=e0e2ea # NvimLightGrey2 foreground=e0e2ea # NvimLightGrey2
background=14161b # NvimDarkGrey2 background=14161b # NvimDarkGrey2
@ -29,7 +29,7 @@ bright5=ffcaff # NvimLightMagenta
bright6=8cf8f7 # NvimLightCyan bright6=8cf8f7 # NvimLightCyan
bright7=eef1f8 # NvimLightGrey1 bright7=eef1f8 # NvimLightGrey1
[colors2] [colors-light]
cursor=e0e2ea 14161b # NvimLightGrey2 NvimDarkGrey2 cursor=e0e2ea 14161b # NvimLightGrey2 NvimDarkGrey2
foreground=14161b # NvimDarkGrey2 foreground=14161b # NvimDarkGrey2
background=e0e2ea # NvimLightGrey2 background=e0e2ea # NvimLightGrey2

View file

@ -3,7 +3,7 @@
# Uses the dark color palette from the default Neovim color scheme # Uses the dark color palette from the default Neovim color scheme
# See: https://github.com/neovim/neovim/blob/fb6c059dc55c8d594102937be4dd70f5ff51614a/src/nvim/highlight_group.c#L419 # See: https://github.com/neovim/neovim/blob/fb6c059dc55c8d594102937be4dd70f5ff51614a/src/nvim/highlight_group.c#L419
[colors] [colors-dark]
cursor=14161b e0e2ea # NvimDarkGrey2 NvimLightGrey2 cursor=14161b e0e2ea # NvimDarkGrey2 NvimLightGrey2
foreground=e0e2ea # NvimLightGrey2 foreground=e0e2ea # NvimLightGrey2
background=14161b # NvimDarkGrey2 background=14161b # NvimDarkGrey2

View file

@ -3,7 +3,10 @@
# Uses the light color palette from the default Neovim color scheme # Uses the light color palette from the default Neovim color scheme
# See: https://github.com/neovim/neovim/blob/fb6c059dc55c8d594102937be4dd70f5ff51614a/src/nvim/highlight_group.c#L334 # See: https://github.com/neovim/neovim/blob/fb6c059dc55c8d594102937be4dd70f5ff51614a/src/nvim/highlight_group.c#L334
[colors] [main]
initial-color-theme=light
[colors-light]
cursor=e0e2ea 14161b # NvimLightGrey2 NvimDarkGrey2 cursor=e0e2ea 14161b # NvimLightGrey2 NvimDarkGrey2
foreground=14161b # NvimDarkGrey2 foreground=14161b # NvimDarkGrey2
background=e0e2ea # NvimLightGrey2 background=e0e2ea # NvimLightGrey2

View file

@ -1,7 +1,7 @@
# OneDark # OneDark
# Palette based on the same theme from https://github.com/dexpota/kitty-themes # Palette based on the same theme from https://github.com/dexpota/kitty-themes
[colors] [colors-dark]
cursor=111111 cccccc cursor=111111 cccccc
foreground=979eab foreground=979eab
background=282c34 background=282c34

View file

@ -7,7 +7,7 @@
# + cursor colors from: # + cursor colors from:
# https://github.com/sonph/onehalf/blob/master/iterm/OneHalfDark.itermcolors # https://github.com/sonph/onehalf/blob/master/iterm/OneHalfDark.itermcolors
[colors] [colors-dark]
cursor=dcdfe4 a3b3cc cursor=dcdfe4 a3b3cc
foreground=dcdfe4 foreground=dcdfe4
background=282c34 background=282c34

View file

@ -1,7 +1,7 @@
# -*- conf -*- # -*- conf -*-
# http://panda.siamak.me/ # http://panda.siamak.me/
[colors] [colors-dark]
# alpha=1.0 # alpha=1.0
background=1D1E20 background=1D1E20
foreground=F0F0F0 foreground=F0F0F0

View file

@ -2,7 +2,7 @@
# PaperColorDark # PaperColorDark
# Palette based on https://github.com/NLKNguyen/papercolor-theme # Palette based on https://github.com/NLKNguyen/papercolor-theme
[colors] [colors-dark]
cursor=1c1c1c eeeeee cursor=1c1c1c eeeeee
background=1c1c1c background=1c1c1c
foreground=eeeeee foreground=eeeeee
@ -25,7 +25,7 @@ bright7=5f8787 # bright white
# selection-foreground=1c1c1c # selection-foreground=1c1c1c
# selection-background=af87d7 # selection-background=af87d7
[colors2] [colors-light]
cursor=eeeeee 444444 cursor=eeeeee 444444
background=eeeeee background=eeeeee
foreground=444444 foreground=444444

View file

@ -2,7 +2,7 @@
# PaperColorDark # PaperColorDark
# Palette based on https://github.com/NLKNguyen/papercolor-theme # Palette based on https://github.com/NLKNguyen/papercolor-theme
[colors] [colors-dark]
cursor=1c1c1c eeeeee cursor=1c1c1c eeeeee
background=1c1c1c background=1c1c1c
foreground=eeeeee foreground=eeeeee

View file

@ -2,7 +2,10 @@
# PaperColor Light # PaperColor Light
# Palette based on https://github.com/NLKNguyen/papercolor-theme # Palette based on https://github.com/NLKNguyen/papercolor-theme
[colors] [main]
initial-color-theme=light
xs
[colors-light]
cursor=eeeeee 444444 cursor=eeeeee 444444
background=eeeeee background=eeeeee
foreground=444444 foreground=444444

View file

@ -1,7 +1,7 @@
# Based on Poimandres color theme for kitti terminal emulator # Based on Poimandres color theme for kitti terminal emulator
# https://github.com/ubmit/poimandres-kitty # https://github.com/ubmit/poimandres-kitty
[colors] [colors-dark]
cursor=1b1e28 ffffff cursor=1b1e28 ffffff
foreground=a6accd foreground=a6accd
background=1b1e28 background=1b1e28

View file

@ -13,7 +13,7 @@
# and also posted here: # and also posted here:
# https://forums.debian.net/viewtopic.php?t=29981 # https://forums.debian.net/viewtopic.php?t=29981
[colors] [colors-dark]
foreground = cccccc foreground = cccccc
background = 191911 background = 191911

View file

@ -1,7 +1,7 @@
# -*- conf -*- # -*- conf -*-
# Rosé Pine # Rosé Pine
[colors] [colors-dark]
cursor=191724 e0def4 cursor=191724 e0def4
background=191724 background=191724
foreground=e0def4 foreground=e0def4

View file

@ -1,7 +1,11 @@
# -*- conf -*- # -*- conf -*-
# Rosé Pine Dawn # Rosé Pine Dawn
[colors] [main]
initial-color-theme=light
[colors-light]
cursor=faf4ed 575279 cursor=faf4ed 575279
background=faf4ed background=faf4ed
foreground=575279 foreground=575279

View file

@ -1,7 +1,7 @@
# -*- conf -*- # -*- conf -*-
# Rosé Pine Moon # Rosé Pine Moon
[colors] [colors-dark]
cursor=232136 e0def4 cursor=232136 e0def4
background=232136 background=232136
foreground=e0def4 foreground=e0def4

View file

@ -1,7 +1,7 @@
# -*- conf -*- # -*- conf -*-
# Selenized dark # Selenized dark
[colors] [colors-dark]
cursor = 103c48 53d6c7 cursor = 103c48 53d6c7
background= 103c48 background= 103c48
foreground= adbcbc foreground= adbcbc
@ -24,7 +24,7 @@ bright5= ff84cd
bright6= 53d6c7 bright6= 53d6c7
bright7= cad8d9 bright7= cad8d9
[colors2] [colors-light]
cursor=fbf3db 00978a cursor=fbf3db 00978a
background= fbf3db background= fbf3db
foreground= 53676d foreground= 53676d

View file

@ -1,7 +1,7 @@
# -*- conf -*- # -*- conf -*-
# Selenized black # Selenized black
[colors] [colors-dark]
cursor = 181818 56d8c9 cursor = 181818 56d8c9
background= 181818 background= 181818
foreground= b9b9b9 foreground= b9b9b9

View file

@ -1,7 +1,7 @@
# -*- conf -*- # -*- conf -*-
# Selenized dark # Selenized dark
[colors] [colors-dark]
cursor = 103c48 53d6c7 cursor = 103c48 53d6c7
background= 103c48 background= 103c48
foreground= adbcbc foreground= adbcbc

View file

@ -1,7 +1,10 @@
# -*- conf -*- # -*- conf -*-
# Selenized light # Selenized light
[colors] [main]
initial-color-theme=light
[colors-light]
cursor=fbf3db 00978a cursor=fbf3db 00978a
background= fbf3db background= fbf3db
foreground= 53676d foreground= 53676d

View file

@ -1,7 +1,10 @@
# -*- conf -*- # -*- conf -*-
# Selenized white # Selenized white
[colors] [main]
initial-color-theme=light
[colors-light]
cursor=ffffff 009a8a cursor=ffffff 009a8a
background= ffffff background= ffffff
foreground= 474747 foreground= 474747

View file

@ -2,7 +2,7 @@
# Solarized dark+light # Solarized dark+light
# Dark # Dark
[colors] [colors-dark]
cursor= 002b36 93a1a1 cursor= 002b36 93a1a1
background= 002b36 background= 002b36
foreground= 839496 foreground= 839496
@ -25,7 +25,7 @@ bright7= fdf6e3
# Light # Light
[colors2] [colors-light]
cursor= fdf6e3 586e75 cursor= fdf6e3 586e75
background= fdf6e3 background= fdf6e3
foreground= 657b83 foreground= 657b83

View file

@ -1,7 +1,7 @@
# -*- conf -*- # -*- conf -*-
# Solarized dark # Solarized dark
[colors] [colors-dark]
cursor= 002b36 93a1a1 cursor= 002b36 93a1a1
background= 002b36 background= 002b36
foreground= 839496 foreground= 839496

View file

@ -1,7 +1,7 @@
# -*- conf -*- # -*- conf -*-
# Solarized dark # Solarized dark
[colors] [colors-dark]
cursor= 002b36 93a1a1 cursor= 002b36 93a1a1
background= 002b36 background= 002b36
foreground= 839496 foreground= 839496

View file

@ -1,7 +1,10 @@
# -*- conf -*- # -*- conf -*-
# Solarized light # Solarized light
[colors] [main]
initial-color-theme=light
[colors-light]
cursor= fdf6e3 586e75 cursor= fdf6e3 586e75
background= fdf6e3 background= fdf6e3
foreground= 657b83 foreground= 657b83

View file

@ -9,7 +9,7 @@
# encoding to sRGB again. # encoding to sRGB again.
# Dark # Dark
[colors] [colors-dark]
cursor= 002b36 93a1a1 cursor= 002b36 93a1a1
background= 002b36 background= 002b36
foreground= 839496 foreground= 839496
@ -32,7 +32,7 @@ bright7= ffffff
# Light # Light
[colors2] [colors-light]
cursor= fdf6e3 586e75 cursor= fdf6e3 586e75
background= fdf6e3 background= fdf6e3
foreground= 657b83 foreground= 657b83

View file

@ -1,6 +1,6 @@
# srcery # srcery
[colors] [colors-dark]
background= 1c1b19 background= 1c1b19
foreground= fce8c3 foreground= fce8c3
regular0= 1c1b19 regular0= 1c1b19

View file

@ -1,7 +1,7 @@
# -*- conf -*- # -*- conf -*-
# Theme: starlight V4 (https://github.com/CosmicToast/starlight) # Theme: starlight V4 (https://github.com/CosmicToast/starlight)
[colors] [colors-dark]
foreground = FFFFFF foreground = FFFFFF
background = 242424 background = 242424

View file

@ -1,7 +1,7 @@
# -*- conf -*- # -*- conf -*-
# Tango # Tango
[colors] [colors-dark]
cursor=000000 babdb6 cursor=000000 babdb6
foreground=babdb6 foreground=babdb6
background=000000 background=000000

View file

@ -3,7 +3,7 @@
# author: Protesilaos Stavrou (https://protesilaos.com) # author: Protesilaos Stavrou (https://protesilaos.com)
# description: Dark theme with a palette inspired by earthly colours (WCAG AA compliant) # description: Dark theme with a palette inspired by earthly colours (WCAG AA compliant)
[colors] [colors-dark]
#cursor = 302420 a9a2a6 #cursor = 302420 a9a2a6
foreground = a9a2a6 foreground = a9a2a6
background = 302420 background = 302420

View file

@ -3,7 +3,7 @@
# author: Protesilaos Stavrou (https://protesilaos.com) # author: Protesilaos Stavrou (https://protesilaos.com)
# description: Dark theme with warm hues (WCAG AA compliant) # description: Dark theme with warm hues (WCAG AA compliant)
[colors] [colors-dark]
#cursor = 232323 aeadaf #cursor = 232323 aeadaf
foreground = aeadaf foreground = aeadaf
background = 232323 background = 232323

View file

@ -3,7 +3,11 @@
# author: Protesilaos Stavrou (https://protesilaos.com) # author: Protesilaos Stavrou (https://protesilaos.com)
# description: Light theme with a soft, slightly desaturated palette (WCAG AA compliant) # description: Light theme with a soft, slightly desaturated palette (WCAG AA compliant)
[colors] [main]
initial-color-theme=light
[colors-light]
#cursor = eff0f2 4a4b4e #cursor = eff0f2 4a4b4e
foreground = 4a4b4e foreground = 4a4b4e
background = eff0f2 background = eff0f2

View file

@ -3,7 +3,10 @@
# author: Protesilaos Stavrou (https://protesilaos.com) # author: Protesilaos Stavrou (https://protesilaos.com)
# description: Light theme with warm colours (WCAG AA compliant) # description: Light theme with warm colours (WCAG AA compliant)
[colors] [main]
initial-color-theme=light
[colors-light]
#cursor = f8f2e5 464340 #cursor = f8f2e5 464340
foreground = 464340 foreground = 464340
background = f8f2e5 background = f8f2e5

View file

@ -3,7 +3,7 @@
# author: Protesilaos Stavrou (https://protesilaos.com) # author: Protesilaos Stavrou (https://protesilaos.com)
# description: Dark theme with a deep blue-ish, slightly desaturated palette (WCAG AA compliant) # description: Dark theme with a deep blue-ish, slightly desaturated palette (WCAG AA compliant)
[colors] [colors-dark]
#cursor = 1f252d a2a8ba #cursor = 1f252d a2a8ba
foreground = a2a8ba foreground = a2a8ba
background = 1f252d background = 1f252d

View file

@ -3,7 +3,10 @@
# author: Protesilaos Stavrou (https://protesilaos.com) # author: Protesilaos Stavrou (https://protesilaos.com)
# description: Light, pleasant theme optimised for long writing/coding sessions (WCAG AA compliant) # description: Light, pleasant theme optimised for long writing/coding sessions (WCAG AA compliant)
[colors] [main]
initial-color-theme=light
[colors-light]
#cursor = fff5f3 4d595f #cursor = fff5f3 4d595f
foreground = 4d595f foreground = 4d595f
background = fff5f3 background = fff5f3

View file

@ -3,7 +3,7 @@
# author: Protesilaos Stavrou (https://protesilaos.com) # author: Protesilaos Stavrou (https://protesilaos.com)
# description: Dark theme with colours inspired by concept art of outer space (WCAG AAA compliant) # description: Dark theme with colours inspired by concept art of outer space (WCAG AAA compliant)
[colors] [colors-dark]
#cursor = 090a18 b4abac #cursor = 090a18 b4abac
foreground = b4abac foreground = b4abac
background = 090a18 background = 090a18

View file

@ -3,7 +3,7 @@
# author: Protesilaos Stavrou (https://protesilaos.com) # author: Protesilaos Stavrou (https://protesilaos.com)
# description: High contrast dark theme with bright colours (WCAG AAA compliant) # description: High contrast dark theme with bright colours (WCAG AAA compliant)
[colors] [colors-dark]
#cursor = 1a1a1a e0e0e0 #cursor = 1a1a1a e0e0e0
foreground = e0e0e0 foreground = e0e0e0
background = 1a1a1a background = 1a1a1a

View file

@ -3,7 +3,10 @@
# author: Protesilaos Stavrou (https://protesilaos.com) # author: Protesilaos Stavrou (https://protesilaos.com)
# description: Light theme inspired by old vaporwave concept art (WCAG AA compliant) # description: Light theme inspired by old vaporwave concept art (WCAG AA compliant)
[colors] [main]
initial-color-theme=light
[colors-light]
#cursor = f3f2f4 53545b #cursor = f3f2f4 53545b
foreground = 53545b foreground = 53545b
background = f3f2f4 background = f3f2f4

View file

@ -3,7 +3,7 @@
# author: Protesilaos Stavrou (https://protesilaos.com) # author: Protesilaos Stavrou (https://protesilaos.com)
# description: Dark theme with a subdued palette on the green side of the spectrum (WCAG AA compliant) # description: Dark theme with a subdued palette on the green side of the spectrum (WCAG AA compliant)
[colors] [colors-dark]
#cursor = 162c22 bbbcbc #cursor = 162c22 bbbcbc
foreground = bbbcbc foreground = bbbcbc
background = 162c22 background = 162c22

View file

@ -3,7 +3,7 @@
# author: Protesilaos Stavrou (https://protesilaos.com) # author: Protesilaos Stavrou (https://protesilaos.com)
# description: Dark theme with a palette inspired by early spring colours (WCAG AA compliant) # description: Dark theme with a palette inspired by early spring colours (WCAG AA compliant)
[colors] [colors-dark]
#cursor = 283a37 b5b8b7 #cursor = 283a37 b5b8b7
foreground = b5b8b7 foreground = b5b8b7
background = 283a37 background = 283a37

View file

@ -3,7 +3,7 @@
# author: Protesilaos Stavrou (https://protesilaos.com) # author: Protesilaos Stavrou (https://protesilaos.com)
# description: Dark theme with colours inspired by summer evenings by the sea (WCAG AA compliant) # description: Dark theme with colours inspired by summer evenings by the sea (WCAG AA compliant)
[colors] [colors-dark]
#cursor = 202c3d a0abae #cursor = 202c3d a0abae
foreground = a0abae foreground = a0abae
background = 202c3d background = 202c3d

View file

@ -3,7 +3,7 @@
# author: Protesilaos Stavrou (https://protesilaos.com) # author: Protesilaos Stavrou (https://protesilaos.com)
# description: A green-scale, subtle theme for late night hackers (WCAG AAA compliant) # description: A green-scale, subtle theme for late night hackers (WCAG AAA compliant)
[colors] [colors-dark]
#cursor = 282b2b b6e0ca #cursor = 282b2b b6e0ca
foreground = b6e0ca foreground = b6e0ca
background = 282b2b background = 282b2b

View file

@ -3,7 +3,10 @@
# author: Protesilaos Stavrou (https://protesilaos.com) # author: Protesilaos Stavrou (https://protesilaos.com)
# description: Light theme for prose or for coding in an open space (WCAG AAA compliant) # description: Light theme for prose or for coding in an open space (WCAG AAA compliant)
[colors] [main]
initial-color-theme=light
[colors-light]
#cursor = ffffff 4a484d #cursor = ffffff 4a484d
foreground = 4a484d foreground = 4a484d
background = ffffff background = ffffff

View file

@ -3,7 +3,7 @@
# author: Protesilaos Stavrou (https://protesilaos.com) # author: Protesilaos Stavrou (https://protesilaos.com)
# description: Dark theme with a vibrant palette (WCAG AA compliant) # description: Dark theme with a vibrant palette (WCAG AA compliant)
[colors] [colors-dark]
#cursor = 001514 a29fa0 #cursor = 001514 a29fa0
foreground = a29fa0 foreground = a29fa0
background = 001514 background = 001514

View file

@ -3,7 +3,7 @@
# author: Protesilaos Stavrou (https://protesilaos.com) # author: Protesilaos Stavrou (https://protesilaos.com)
# description: Dark theme with a palette inspired by winter nights at the city (WCAG AA compliant) # description: Dark theme with a palette inspired by winter nights at the city (WCAG AA compliant)
[colors] [colors-dark]
#cursor = 202427 8da3b8 #cursor = 202427 8da3b8
foreground = 8da3b8 foreground = 8da3b8
background = 202427 background = 202427

View file

@ -2,7 +2,10 @@
# Reference: https://github.com/tokyo-night/tokyo-night-vscode-theme/blob/master/themes/tokyo-night-light-color-theme.json # Reference: https://github.com/tokyo-night/tokyo-night-vscode-theme/blob/master/themes/tokyo-night-light-color-theme.json
[colors] [main]
initial-color-theme=light
[colors-light]
background=d6d8df background=d6d8df
foreground=343b58 foreground=343b58
regular0=343b58 regular0=343b58

View file

@ -1,6 +1,6 @@
# -*- conf -*- # -*- conf -*-
[colors] [colors-dark]
background=1a1b26 background=1a1b26
foreground=c0caf5 foreground=c0caf5
regular0=15161E regular0=15161E

View file

@ -1,6 +1,6 @@
# -*- conf -*- # -*- conf -*-
[colors] [colors-dark]
background=24283b background=24283b
foreground=c0caf5 foreground=c0caf5
regular0=1D202F regular0=1D202F

Some files were not shown because too many files have changed in this diff Show more