Lines Matching refs:colour
46 * Convert an RGB triplet to the xterm(1) 256 colour palette.
48 * xterm provides a 6x6x6 colour cube (16 - 231) and 24 greys (232 - 255). We
49 * map our RGB colour to the closest in the cube, also work out the closest
69 /* If we have hit the colour exactly, return early. */
81 /* Is grey or 6x6x6 colour closest? */
90 /* Join RGB into a colour. */
99 /* Split colour into RGB. */
108 /* Force colour to RGB if not already. */
123 /* Convert colour to a string. */
140 xsnprintf(s, sizeof s, "colour%u", c & 0xff);
185 /* Convert colour from string. */
205 if (strncasecmp(s, "colour", (sizeof "colour") - 1) == 0) {
206 n = strtonum(s + (sizeof "colour") - 1, 0, 255, &errstr);
258 /* Convert 256 colour to RGB colour. */
332 /* Convert 256 colour to 16 colour. */
358 /* Get colour by X11 colour name. */
963 /* Parse colour from an X11 string. */
970 int colour = -1;
976 colour = colour_join_rgb(r, g, b);
980 colour = colour_join_rgb(r >> 8, g >> 8, b >> 8);
985 colour = colour_join_rgb(
997 colour = colour_byname(copy);
1000 log_debug("%s: %s = %s", __func__, p, colour_tostring(colour));
1001 return (colour);
1038 /* Get a colour from a palette. */
1059 /* Set a colour in a palette. */