84 if (!has_color && !cc)
88 if ((has_color && !cc) || (!has_color && cc))
91 if ((cc->
fg ==
fg) && (cc->
bg ==
bg))
struct AttrColor * attr_color_new(void)
Create a new AttrColor.
bool attr_color_is_set(const struct AttrColor *ac)
Is the object coloured?
Color and attribute parsing.
int32_t color_t
Type for 24-bit colour value.
struct CursesColor * curses_color_new(color_t fg, color_t bg)
Create a new CursesColor.
void curses_color_free(struct CursesColor **ptr)
Free a CursesColor.
void merged_colors_cleanup(void)
Free the list of Merged colours.
void merged_colors_init(void)
Initialise the Merged colours.
const struct AttrColor * merged_color_overlay(const struct AttrColor *base, const struct AttrColor *over)
Combine two colours.
struct AttrColorList MergedColors
Array of user colours.
static struct AttrColor * merged_colors_find(color_t fg, color_t bg, int attrs)
Find a Merged colour.
Convenience wrapper for the library headers.
#define TAILQ_FOREACH(var, head, field)
#define TAILQ_FOREACH_SAFE(var, head, field, tvar)
#define TAILQ_INSERT_TAIL(head, elm, field)
#define TAILQ_REMOVE(head, elm, field)
A curses colour and its attributes.
struct ColorElement bg
Background colour.
struct ColorElement fg
Foreground colour.
int attrs
Text attributes, e.g. A_BOLD.
struct CursesColor * curses_color
Underlying Curses colour.
Colour in the ncurses palette.
color_t fg
Foreground colour.
color_t bg
Background colour.