mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-04-29 05:49:11 +00:00
11 lines
No EOL
253 B
JavaScript
11 lines
No EOL
253 B
JavaScript
import color from 'color'
|
|
|
|
export const msgToReal = msg => msg.replace(/</g, '<').replace(/\n/g, '<br />')
|
|
|
|
export const colorToCSS = colorInt => {
|
|
if (colorInt === 0) {
|
|
return '#fff'
|
|
}
|
|
|
|
return color(colorInt).hsl().string()
|
|
} |