74 assert(name_bg != NULL);
75 assert(name_fg != NULL);
92 if (bg_num < bg_den) {
93 *bg =
mix_colour(bg_sys, *fg, 255 * bg_num / bg_den);
100 if (bg_hover != NULL) {
101 *bg_hover = dark_mode ?
106 if (fg_subtle != NULL) {
107 *fg_subtle =
mix_colour(*fg, *bg, 255 * 25 / 32);
110 if (fg_faded != NULL) {
111 *fg_faded =
mix_colour(*fg, *bg, 255 * 20 / 32);
114 if (fg_good != NULL) {
119 if (fg_bad != NULL) {
211 assert(stylesheet_out != NULL);
215 "\tbackground-color: #%06"PRIx32
";\n"
217 ".ns-odd-bg-hover {\n"
218 "\tbackground-color: #%06"PRIx32
";\n"
221 "\tcolor: #%06"PRIx32
";\n"
223 ".ns-odd-fg-subtle {\n"
224 "\tcolor: #%06"PRIx32
";\n"
226 ".ns-odd-fg-faded {\n"
227 "\tcolor: #%06"PRIx32
";\n"
229 ".ns-odd-fg-good {\n"
230 "\tcolor: #%06"PRIx32
";\n"
233 "\tcolor: #%06"PRIx32
";\n"
236 "\tbackground-color: #%06"PRIx32
";\n"
238 ".ns-even-bg-hover {\n"
239 "\tbackground-color: #%06"PRIx32
";\n"
242 "\tcolor: #%06"PRIx32
";\n"
244 ".ns-even-fg-subtle {\n"
245 "\tcolor: #%06"PRIx32
";\n"
247 ".ns-even-fg-faded {\n"
248 "\tcolor: #%06"PRIx32
";\n"
250 ".ns-even-fg-good {\n"
251 "\tcolor: #%06"PRIx32
";\n"
253 ".ns-even-fg-bad {\n"
254 "\tcolor: #%06"PRIx32
";\n"
257 "\tborder-color: #%06"PRIx32
";\n"
274 assert(ret > 0 && (
size_t)ret <
sizeof(
buffer));
275 if (ret < 0 || (
size_t)ret >=
sizeof(
buffer)) {
static osspriteop_area * buffer
The buffer characteristics.
nserror
Enumeration of error codes.
@ NSERROR_NOSPACE
Insufficient space.
Netsurf additional integer type formatting macros.
static nserror nscolour__get(const char *name_bg, const char *name_fg, unsigned bg_num, unsigned bg_den, colour *bg, colour *bg_hover, colour *fg, colour *fg_subtle, colour *fg_faded, colour *fg_good, colour *fg_bad, colour *border)
Set some colours up from a couple of system colour entries.
nserror nscolour_update(void)
Update the nscolour table from the current nsoptions.
colour nscolours[NSCOLOUR__COUNT]
NetSurf UI colour table.
nserror nscolour_get_stylesheet(const char **stylesheet_out)
Get a pointer to a stylesheet for nscolours.
NetSurf UI colours (interface).
@ NSCOLOUR_TEXT_INPUT_FG_SUBTLE
@ NSCOLOUR_WIN_ODD_FG_FADED
@ NSCOLOUR_WIN_ODD_BG_HOVER
@ NSCOLOUR_WIN_ODD_FG_GOOD
@ NSCOLOUR_WIN_EVEN_BORDER
@ NSCOLOUR_WIN_EVEN_BG_HOVER
@ NSCOLOUR_WIN_EVEN_FG_SUBTLE
@ NSCOLOUR_WIN_ODD_BORDER
@ NSCOLOUR_WIN_ODD_FG_SUBTLE
@ NSCOLOUR_WIN_EVEN_FG_BAD
@ NSCOLOUR_WIN_ODD_FG_BAD
@ NSCOLOUR_WIN_EVEN_FG_FADED
@ NSCOLOUR_WIN_EVEN_FG_GOOD
plotter style interfaces, generic styles and style colour helpers.
#define half_darken_colour(c1)
#define colour_rb_swap(c)
#define blend_colour(c0, c1)
@ PLOT_COLOUR_COMPONENT_RED
@ PLOT_COLOUR_COMPONENT_GREEN
#define colour_lightness(c0)
Obtain the luminance of a colour according to ITU BT.601.
#define mix_colour(c0, c1, p)
#define colour_to_bw_nearest(c0)
static colour colour_engorge_component(colour col, bool dark, enum plot_colour_component comp)
Engorge a particular colour channel.
#define half_lighten_colour(c1)
Container for border values during table border calculations.
nserror ns_system_colour_char(const char *name, colour *colour_out)
Obtain a system colour from a name.
Interface to system colour values.
uint32_t colour
Colour type: XBGR.