paracycle / slackthemes

A Slack sidebar theme browser
http://slackthemes.net
885 stars 262 forks source link

Add ability to generate random themes #19

Open paracycle opened 9 years ago

paracycle commented 9 years ago

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?

atesgoral commented 9 years ago

It wouldn't be too hard to add a "randomize" button to:

  1. Randomly pick a base HSV colour (I'd normalize all components to [0-1) for cleaner computation)
  2. Randomly pick a colour scheme, or use a fixed scheme
  3. Pick the complementary colours based on the scheme - e.g. just offset the initial hue by 1/3, 1/2 etc.
  4. 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
  5. 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...

atesgoral commented 9 years ago

Could use https://github.com/avp/spectra