A simple PHP lib that can color nick names to make them distinguishable in a chat room.
Each color is unique to the name so each name keeps its color regardless of the time, system
or whatever circumstances. This is done using a sha1 hash on the name and taking the first 7
characters in it hex representation to calculate the color.
PHP 5.4 or higher.
Using Composer:
composer require cebe/color-nick
<?php
use cebe\colornick\Color;
require(__DIR__ . '/vendor/autoload.php');
$color = Color::calculateColor($name);See example.php for a working example. Here is a screenshot of the output:
MIT, see LICENSE file for more details.


