mirror of
https://github.com/Aviortheking/codestats-readme.git
synced 2025-04-22 10:42:08 +00:00
Verify hex color in gradient
This commit is contained in:
parent
be285cb33e
commit
074e22017e
@ -61,7 +61,7 @@ function clampValue(number, min, max) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function fallbackColor(color, fallbackColor) {
|
function fallbackColor(color, fallbackColor) {
|
||||||
return (isValidHexColor(color) && `#${color}`) || (color.includes(',') && color.split(',')) || fallbackColor;
|
return (isValidHexColor(color) && `#${color}`) || (color.includes(',') && isValidHexColor(color.split(',')[1]) && isValidHexColor(color.split(',')[2]) && color.split(',')) || fallbackColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
function request(data, headers) {
|
function request(data, headers) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user