From 32aa49a2299ea2bf95b72631dfafac7090c3c6e9 Mon Sep 17 00:00:00 2001 From: Federico Angelilli Date: Thu, 11 Jul 2024 23:09:27 +0200 Subject: Print color --- src/config.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/config.c') diff --git a/src/config.c b/src/config.c index 93b4f53..1488a55 100644 --- a/src/config.c +++ b/src/config.c @@ -101,10 +101,6 @@ static bool config_read_bool(const char *value, bool *result) static bool config_read_color(const char *value, color_t *result) { - if (!strcmp(value, "rgb")) { - log_panic("TODO"); - } - if (value[0] == '#') { char *end; unsigned long n = strtoul(value + 1, &end, 16); @@ -212,7 +208,9 @@ static bool config_entry(config_t *config, int line, const char *section, const case CONFIG_COLOR: if (config_read_color(value, (color_t *)result)) { - log_debug("Config '%s' set to '%s'", key, value); + char *color = color_to_string((color_t *)result); + log_debug("Config '%s' set to '%s'", key, color); + free(color); return true; } break; -- cgit v1.2.3