String to Color provides developers with a very simple way of adding a random color code generation utility to their projects.
Instead of using complex mathematical functions, this library can be pointed at a text found on the Web page itself and use that text to generate a random hex color code which then can be applied to various other elements on the page.
For example: The title of an article can be used to generate the color of the page's background.
And the best thing about it is that the String to Color library has been sanitized to avoid situations where most of the generated color codes are bland grays, browns, and dark tones. This way you get the cool, shiny, eye-catchy colors.
A String to Color demo is included with the download package.
If you don't like JavaScript, this script is also available in a PHP version.
Requirements:
- JavaScript enabled on client side
Comments not found