Categories
creative internets web design

random background colors experiment

A while back i made a random background color generator. What was cool about that was it took a random color (actually, three) and determined whether it was generally visually dark or light, then used that determination to color the text accordingly light or dark gray for contrast.

So today, after not really working with PHP (or much code at all) for several years, i decided to revisit my experiment. Instead of either light or dark gray, i wanted to take the random colors i generated and lighten or darken them up, so they’re the same hue, just darker or lighter depending on the value of the generated color. The contrast is a lot more subtle, however. Maybe next i’ll see if i can add a contrast switcher to it.

Here’s that experiment.

Here’s the source code in either pretty HTML or plain text format.

By jae

jae lethe (he/she/they) is a blogger, musician, artist, poet, web developer/designer, armchair philosophizer, teller of tales, and gadabout. Also, something he calls a "behavioral artist." (Not sure.) She has plans. BIG plans.

Among the things that he has done for a laugh are minor fractures, cuts, scrapes, and various scabs. Though she's quick to point out that they're no imbecile, we're fairly certain that he thinks the word means some kind of medieval pharmacist.

This is her latest home on teh internets - where jae stores their swear words, when they're not hurling them at the sun in vain.