ELinks 0.18.0
color.h File Reference
This graph shows which files directly or indirectly include this file:

Data Structures

struct  color_pair
 

Macros

#define INIT_COLOR_PAIR(bg, fg)   { bg, fg }
 

Typedefs

typedef uint32_t color_T
 

Functions

int decode_color (const char *str, int slen, color_T *color)
 Decode the color string.
 
const char * get_color_string (color_T color, char hexcolor[8])
 Returns a string containing the color info.
 
void color_to_string (color_T color, char str[8])
 Translate rgb color to string in #rrggbb format.
 
Fastfind lookup management.
void init_colors_lookup (void)
 
void free_colors_lookup (void)
 

Macro Definition Documentation

◆ INIT_COLOR_PAIR

#define INIT_COLOR_PAIR ( bg,
fg )   { bg, fg }

Typedef Documentation

◆ color_T

typedef uint32_t color_T

Function Documentation

◆ color_to_string()

void color_to_string ( color_T color,
char str[8] )

Translate rgb color to string in #rrggbb format.

str should be a pointer to an 8 bytes memory space.

◆ decode_color()

int decode_color ( const char * str,
int slen,
color_T * color )

Decode the color string.

The color string can either contain '#FF0044' style declarations or color names.

◆ free_colors_lookup()

void free_colors_lookup ( void )

◆ get_color_string()

const char * get_color_string ( color_T color,
char hexcolor[8] )

Returns a string containing the color info.

If no 'English' name can be found the hex color (#rrggbb) is returned in the given buffer.

◆ init_colors_lookup()

void init_colors_lookup ( void )