Use HSLuv for nick colors

This commit is contained in:
Ken-Håvard Lieng 2018-10-08 01:34:53 +02:00
parent 6146b27adc
commit afc80650e7
6 changed files with 19 additions and 12 deletions

View file

@ -1,5 +1,5 @@
import React, { PureComponent } from 'react';
import stringToHSL from 'utils/color';
import stringToRGB from 'utils/color';
export default class UserListItem extends PureComponent {
handleClick = () => this.props.onClick(this.props.user.nick);
@ -7,7 +7,7 @@ export default class UserListItem extends PureComponent {
render() {
const { user } = this.props;
const style = {
color: stringToHSL(user.nick),
color: stringToRGB(user.nick),
...this.props.style
};