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

This package is auto-updated.

Last update: 2023-03-18 09:57:20 UTC


README

Latest Stable Version Total Downloads Build Status Coverage Status StyleCI License

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 #f03c15 30, 138, 114
Sasha #f03c15 90, 117, 38

License

The project released under MIT license.