- /* allow aliases for xterm color resources */
- if (m_strncasecmp(s, "color", 5) == 0) {
- s += 5;
- *col = strtol (s, &eptr, 10);
- if (!*s || *eptr || *col < 0 ||
- (*col >= COLORS && !option (OPTNOCURSES) && has_colors ())) {
- snprintf (err->data, err->dsize, _("%s: color not supported by term"),
- s);
- return (-1);
+ if ((*col = mutt_getvaluebyname (s, Colors)) == -1) {
+ snprintf (err->data, err->dsize, _("%s: no such color"), s);
+ return -1;