SUI-Components/sui-theme

Gradients generator Mixin

Closed this issue · 4 comments

Given a color we need to be able to generate a set of lighter or darker color variations using a mixin.
This mixin should maintain color hue and saturation and generate this variation modifying lightness value only.

Lets say UX provide a $primary color and a set of lighter and darker values as shown in the caption below. This mixin will must provide the automated variations so we'll be able to map them later in a list of Sass vars:

$c-primary-l1: color-variation($c-primary, step-l1)
$c-accent-l2: color-variation($c-accent, step-l2)

lightnessgradients

naxhh commented

I know nothing about this. but isn't hsla a good thing for this?

Indeed, the reason why we need this mixin is because all color values that we have are stored in #HEX format as you can see here.

jcger commented

@davecarter can this be closed?

yes!
actually this feature was developed and merged here a while ago