Lines Matching defs:hex
141 /* convert hex color names,
161 rgbFromHex(char *hex, int *r, int *g, int *b)
165 if (hex == NULL || hex[0] != '#')
168 len = strlen(hex);
170 *r = hexCharToInt(hex[1]);
171 *g = hexCharToInt(hex[2]);
172 *b = hexCharToInt(hex[3]);
174 *r = hexCharToInt(hex[1]) * 16 + hexCharToInt(hex[2]);
175 *g = hexCharToInt(hex[3]) * 16 + hexCharToInt(hex[4]);
176 *b = hexCharToInt(hex[5]) * 16 + hexCharToInt(hex[6]);
180 *r = hexCharToInt(hex[1]) * 16 + hexCharToInt(hex[2]);
181 *g = hexCharToInt(hex[5]) * 16 + hexCharToInt(hex[6]);
182 *b = hexCharToInt(hex[9]) * 16 + hexCharToInt(hex[10]);
201 if (name[0] == '#') { /* a hex string */