Modul:Color contrast: Unterschied zwischen den Versionen
keine Bearbeitungszusammenfassung
(add support for hsl) |
Keine Bearbeitungszusammenfassung |
||
| Zeile 56: | Zeile 56: | ||
end | end | ||
-- whitespace | -- whitespace | ||
c = c:match( '^%s*(.-)%s*$' ) | c = c:match( '^%s*(.-)[%s;]*$' ) | ||
-- lowercase | -- lowercase | ||
| Zeile 67: | Zeile 67: | ||
end | end | ||
-- remove leading # (if there is one) and whitespace | -- remove leading # (if there is one) and whitespace | ||
c = mw.ustring.match(c, '^[%s#]*([a-f0-9]*)[%s | c = mw.ustring.match(c, '^[%s#]*([a-f0-9]*)[%s]*$') | ||
-- convert from hsl | -- convert from hsl | ||