This repository has been archived on 2024-02-08. You can view files and clone it, but cannot push or open issues or pull requests.
|
/**
|
|
* Returns the hex color code without the '#' if it has one.
|
|
*
|
|
* @param color
|
|
* @returns {string}
|
|
*/
|
|
export function colorFromHex(color: string) {
|
|
if (color.substring(0, 1) === '#') {
|
|
color = color.substring(1, 7)
|
|
}
|
|
|
|
return color
|
|
}
|