Update color parsing and formatting (#5442)

* Replace `culori` with simple color parser

* Use space-separated color syntax

* Update default color values to use space-separated syntax

* Update separator regex

* Fix tests

* add tests for the new `color` util

Also slightly modified the `color` util itself to take `transparent`
into account and also format every value as a string for consistency.

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
This commit is contained in:
Brad Cornes 2021-09-09 15:15:53 +01:00 • committed by GitHub
parent 12fa78b9ca
commit 4919cbfbb8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 409 additions and 302 deletions

12
package-lock.json generated
View file

@ -12,8 +12,8 @@
"arg": "^5.0.1",
"chalk": "^4.1.2",
"chokidar": "^3.5.2",
"color-name": "^1.1.4",
"cosmiconfig": "^7.0.1",
"culori": "^0.19.1",
"detective": "^5.2.0",
"didyoumean": "^1.2.2",
"dlv": "^1.1.3",
@ -3803,11 +3803,6 @@
"integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==",
"dev": true
},
"node_modules/culori": {
"version": "0.19.1",
"resolved": "https://registry.npmjs.org/culori/-/culori-0.19.1.tgz",
"integrity": "sha512-K/NLpdtNnSQwH2Ru/Fk39wDL40v9PxTBFY6jHQegJDhmBqrE/d9mJB/AD4odSZJml10AlJjZdm6+I9JM3nE/EQ=="
},
"node_modules/data-urls": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz",
@ -13157,11 +13152,6 @@
}
}
},
"culori": {
"version": "0.19.1",
"resolved": "https://registry.npmjs.org/culori/-/culori-0.19.1.tgz",
"integrity": "sha512-K/NLpdtNnSQwH2Ru/Fk39wDL40v9PxTBFY6jHQegJDhmBqrE/d9mJB/AD4odSZJml10AlJjZdm6+I9JM3nE/EQ=="
},
"data-urls": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz",