Merge branch 'master' into shared_cache

This commit is contained in:
Daniel Imms
2022-10-04 13:54:14 -07:00
committed by GitHub
5 changed files with 25 additions and 23 deletions
+1 -1
View File
@@ -134,7 +134,7 @@ export namespace css {
*/
export function toColor(css: string): IColor {
// Formats: #rgb[a] and #rrggbb[aa]
if (css.match(/#[0-9a-f]{3,8}/i)) {
if (css.match(/#[\da-f]{3,8}/i)) {
switch (css.length) {
case 4: { // #rgb
$r = parseInt(css.slice(1, 2).repeat(2), 16);