v1/UI/src/utils.js
2020-08-02 16:28:46 -04:00

11 lines
244 B
JavaScript

import color from 'color'
export const msgToReal = (msg) => msg.replace(/</g, '&lt;').replace(/\n/g, '<br />')
export const colorToCSS = (colorInt) => {
if (colorInt === 0) {
return '#fff'
}
return color(colorInt).hsl().string()
}