Languages
[Edit]
EN

SASS - lighten color

0 points
Created by:
trincot
360

In this article, we would like to show you how to lighten color in SASS.

Quick solution:

Where:

  • lighten() - is a function that increases lightness of a color by a fixed amount value,
  • $color - is a color variable or any color value - rgb / rgba / hex / color name / etc.,
  • $amount - is a percentage value by which the brightness of the color will increase, it must be a number between 0% and 100%.

 

Practical examples

Edit

Example 1

Edit

In this example, we lighten the red color by 30%. The result is pink color.

rgb:

hex:

Example 2

Edit

In this example, we present how to lighten variable in which color value is stored.

 

References

Edit
  1. Sass: sass:color - lighten

Alternative titles

  1. SASS - lighten color variable
  2. SASS - make color variable lighter
1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join