[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

New function css-color (accompanying x11-color) (issue 570690043 by addr

From: thomasmorley65
Subject: New function css-color (accompanying x11-color) (issue 570690043 by address@hidden)
Date: Mon, 03 Jun 2019 15:13:53 -0700
File scm/color.scm (right):
scm/color.scm:678: (define css-color-list
Is there anything new in this list or are all entries always alias?
If the latter, why spelling it out? Instead one could do:
    (lambda (elt)
        (string->symbol (string-downcase (symbol->string (car elt))))
        (cdr elt)))

Or even join them with
(append <above> x11-color-list)
Probably sorting it and deleting duplicates.

Would save one argument in make-color-handler below.
The other argument could be thrown out, if you first try to get a color
with the user-input, then with a downcased user-input and if all that is
not successful fallback to black with warning.

Ofcourse this leads to identical definitions for css-color and x11-color
and x11-color would return a color even for p.e. Darkblue (wrongly
I can't imagine a problem, though

reply via email to

[Prev in Thread] Current Thread [Next in Thread]