forked from vikunja/frontend
14 lines
245 B
TypeScript
14 lines
245 B
TypeScript
/**
|
|
* 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
|
|
}
|