yeun / open-color

Color scheme for UI design.
https://yeun.github.io/open-color/
MIT License
5.29k stars 243 forks source link

Update open-color.scss #42

Closed ibbatta closed 7 years ago

ibbatta commented 8 years ago

I found this way to use your tool. Define a sass function and look for a color through a double-check map.

Same result, less lines of code

To use a colour and a spectrum:

body {
   background-color: oc-color(red, 1);
}

Hope it could be fine for you (and sorry for my awful english)

makepanic commented 8 years ago

This looks like a breaking change though. From how I understood it, previous variables like $oc-orange-2 won't work anymore?

What about adding the oc-color function and still keeping the old $oc- variables?

Btw the open-color.scss is currently generated via https://github.com/yeun/open-color/blob/master/templates/open-color.scss.hbs which means we have to change the scss template to change its output.

@yeun there's currently no CONTRIBUTING.md that explains users what to change to modify generated files. Maybe it's a good idea to add one to open-color?

ibbatta commented 8 years ago

My fault. I didn't know. I could work to keep the current "code style" but reducing the code lines :)

Thanks for your explanation!

yeun commented 8 years ago

@makepanic Yes, you are right. If you don't mind would I ask you to do it?