MCPcopy Create free account
hub / github.com/NetHack/NetHack / curses_init_rgb

Function curses_init_rgb

win/curses/cursinit.c:304–316  ·  view source on GitHub ↗

create a new color */

Source from the content-addressed store, hash-verified

302
303/* create a new color */
304int
305curses_init_rgb(int r, int g, int b)
306{
307 if (!can_change_color())
308 return 0;
309
310 if (colors_used < COLORS - 1) {
311 colors_used++;
312 init_color(colors_used, r*4, g*4, b*4);
313 return colors_used;
314 }
315 return 0;
316}
317
318/* create a new foreground/background combination */
319int

Callers 1

curses_parse_wid_colorsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected