Posts A simple color generator
Post

A simple color generator

I wanted a quick and easy way to generate semi-random, but consistent colours.

I figured since I could get consistent hex values off of a string using an md5 hash, slicing the last 6 characters from a hash would generate such a colour code.

Here’s a little pen that demos the idea:

See the Pen Color test thing by Jackson Bates (@Malgalin) on CodePen.


If you have any questions or comments, ping me on Twitter: @JacksonBates. If you liked this post, you can share it!

This post is licensed under CC BY 4.0 by the author.