mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
Utilities to handle Colors
This commit is contained in:
@@ -16,6 +16,7 @@ export function getRandomPairOfColors() {
|
||||
}
|
||||
|
||||
function hexToRgb(hex: string = '') {
|
||||
// @ts-ignore
|
||||
const match = hex.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i)
|
||||
|
||||
if (!match) {
|
||||
|
Reference in New Issue
Block a user