Reputation: 105
I'm very new with LESS and still learning. How can I get the output color in RBG of a color with opacity over a base color?
For example:
90% WHITE over RED = #ffbfbf (pinkish)
Upvotes: 1
Views: 209
Reputation: 240928
LESS has built-in color functions to handle this.
In your case, you could get 90%
of white using darken(#fff, 10%)
. From there you could use the mix()
function to combine that with red at a specified weight.
For example:
background-color: mix(darken(#fff, .1), #f00, 75%);
Outputs:
background-color: #ffbfbf;
Upvotes: 1