less Color Operation Functions Changing opacity


Example

It is possible to change the opacity of a color with fade() function.

fade() takes 2 parameters:

  • a color
  • opacity (in %)

Example:

@elegant: #eeffgg;

.light-elegant {
    background-color: fade(@elegant, 20%);
}
<div class="light-elegant">
    I have a 20% elegant background!
</div>