slackthemes
slackthemes copied to clipboard
Add ability to generate random themes
There should be a way to generate random themes that would be pleasing to the eye. Don't know enough about harmonious colors and color theory to pull it off though. Any thoughts @atesgoral?
It wouldn't be too hard to add a "randomize" button to:
- Randomly pick a base HSV colour (I'd normalize all components to [0-1) for cleaner computation)
- Randomly pick a colour scheme, or use a fixed scheme
- Pick the complementary colours based on the scheme - e.g. just offset the initial hue by 1/3, 1/2 etc.
- Use luminance computation to pick light/dark text (see what we did for the RelayRobin theme customizer) -- this might be the trickiest part to keep the text readable
- Go from HSV to RGB
Some inspiration:
http://paletton.com/ http://app.coolors.co/ https://color.adobe.com/create/color-wheel/ http://www.perbang.dk/color+scheme/
I can jsfiddle around with this when I have the time...
Could use https://github.com/avp/spectra