ColorHighlighter
ColorHighlighter copied to clipboard
Ability to read colors from SASS map
Hi there, another feature request:
We often use SASS maps to define our colors, as it makes it more easy to define color variants:
$colors: (
'white': (
base: #fff
),
'black': (
base: #000,
slider: rgba(0, 0, 0, 0.4)
),
'grey': (
base: #f0f0f0,
bg: #f2f2f2,
border: #d8d8d8,
heading: #7c7b7b,
heading_border: #dcdcdc,
background_hover: #f9f9f9
),
'green': (
base: #82cac5,
slider: rgba(130, 202, 197, 0.9),
border: #518e8a,
background_hover: darken(#82cac5,5%),
heading: #82cac5
),
'blue': (
base: #82cac5,
facebook: #3a5898,
facebook_button: #334e89,
twitter: #00aced,
twitter_button: #0090c7,
instagram: #3f729b,
instagram_button: #335b7c
)
);
Any chance to get this working in conjunction with ColorHighlighter as well?
Thanks!
Wow, that'll take whole alot of parsing. My first goal here is https://github.com/Monnoroch/ColorHighlighter/issues/101, which is hard on it's own, so it'll take some thought and time.
You could pipe it through a SASS parser - or are you afraid it will be that expensive on the performance side? I'm not sure how these kind of things work, but maybe a dependancy on libsass would be suiting both issues - I think piping it through libsass directly could also make your life a bit easier at #101 as well :-)
I use the color map like this by the way:
map-get(map-get($colors, 'blue'), 'facebook');
Would be a nice addition, thanks for looking into it!
That would be very complicated to do manually. SASS parser is ok, but what about also less/styl? Too many depencencies.