M
M
Michael R.2018-05-11 20:39:48
Sass
Michael R., 2018-05-11 20:39:48

How to increase color vibrancy (scss)?

Hey!
Suppose there is a color #ff7fa1, how to use scss:
1. Increase its juiciness to the maximum level #ff0044?
2. Reduce its juiciness to the minimum level #ffffff?
Thank you!
5af5d543c3250111057903.png5af5d54a655a5193868560.png5af5d54e5be65326288089.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Michael R., 2018-05-12
@Mike_Ro

Solution 1:

.element
{
color: hsla(hue($color), 10%, 10%, 1.0);
}

.c1
{
  $l : lightness($color);
  color: if($l > 50, darken($color, ($l)-50), lighten($color, 50-($l)));
}

.c2
{
  color: lighten($color, 100-(lightness($color)));
}

A
Alexander Pushkarev, 2018-05-11
@AXP-dev

Lighten/Darken
Saturation
Insert color and watch online - scg.ar-ch.org

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question