gomzyakov / string-to-color
This package is abandoned and no longer maintained.
No replacement package was suggested.
Simple string to RGB-color converter.
v1.0.1
2019-09-15 04:42 UTC
Requires
- php: >=7.2
This package is auto-updated.
Last update: 2023-03-18 09:57:20 UTC
README
String-to-Color Converter
This library allows to create color (RGB or HEX) from a given string. The usage is as simple as possible (one line). The returned value for each string will be the same for each execution so it's ideal for generating dedicated user color from his/her name/username/email etc.
Installation
From the command line run:
$ composer require gomzyakov/string-to-color
Usage
echo \Gomzyakov\StringToColor::convertStringToColor('Some text');
Example outputs
Input | Color | Output RGB |
---|---|---|
Gomzyakov | 30, 138, 114 | |
Sasha | 90, 117, 38 |
License
The project released under MIT license.