59 int r = (fg >> 16) & 0xff;
60 int g = (fg >> 8) & 0xff;
61 int b = (fg >> 0) & 0xff;
63 pos += snprintf(text + pos,
sizeof(text) - pos,
"\033[38;2;%d;%d;%dm", r, g, b);
68 int r = (bg >> 16) & 0xff;
69 int g = (bg >> 8) & 0xff;
70 int b = (bg >> 0) & 0xff;
72 pos += snprintf(text + pos,
sizeof(text) - pos,
"\033[48;2;%d;%d;%dm", r, g, b);
75 pos += snprintf(text + pos,
sizeof(text) - pos,
"XXXXXX\033[0m");
95 char color_fg[64] = { 0 };
96 char color_bg[64] = { 0 };
131 snprintf(
fg,
sizeof(
fg),
"#%06x", cc->
fg);
133 snprintf(
bg,
sizeof(
bg),
"#%06x", cc->
bg);
161 snprintf(
fg,
sizeof(
fg),
"#%06x", cc->
fg);
163 snprintf(
bg,
sizeof(
bg),
"#%06x", cc->
bg);
183 char color_fg[64] = { 0 };
184 char color_bg[64] = { 0 };
int buf_add_printf(struct Buffer *buf, const char *fmt,...)
Format a string appending a Buffer.
size_t buf_addstr(struct Buffer *buf, const char *s)
Add a string to a Buffer.
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
void color_log_color_attrs(struct AttrColor *ac, struct Buffer *swatch)
Get a colourful string to represent a colour in the log.
const char * color_log_name(char *buf, int buflen, struct ColorElement *elem)
Get a string to represent a colour name.
const char * color_log_attrs_list(int attrs)
Get a string to represent some attributes in the log.
int32_t color_t
Type for 24-bit colour value.
const char * color_log_color(color_t fg, color_t bg)
Get a colourful string to represent a colour in the log.
void ansi_colors_dump(struct Buffer *buf)
Dump all the ANSI colours.
void curses_color_dump(struct CursesColor *cc, const char *prefix)
Log one Curses colour.
void curses_colors_dump(struct Buffer *buf)
Dump all the Curses colours.
struct AttrColorList MergedColors
Array of user colours.
struct CursesColorList CursesColors
List of all Curses colours.
void merged_colors_dump(struct Buffer *buf)
Dump all the Merged colours.
static int color_debug(enum LogLevel level, const char *format,...)
Convenience wrapper for the gui headers.
@ LL_DEBUG5
Log at debug level 5.
Convenience wrapper for the library headers.
struct MuttWindow * window_get_focus(void)
Get the currently focused Window.
@ WT_CUSTOM
Window with a custom drawing function.
@ WT_PAGER
A panel containing the Pager Window.
struct Buffer * buf_pool_get(void)
Get a Buffer from the pool.
void buf_pool_release(struct Buffer **ptr)
Return a Buffer to the pool.
#define TAILQ_FOREACH(var, head, field)
#define TAILQ_EMPTY(head)
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.
String manipulation buffer.
Colour in the ncurses palette.
color_t fg
Foreground colour.
color_t bg
Background colour.
short ref_count
Number of users.
void * wdata
Private data.
struct MuttWindow * parent
Parent Window.
enum WindowType type
Window type, e.g. WT_SIDEBAR.