Skip to content

Commit 0f2d382

Browse files
author
meri
committed
Added tint and shade. Close less#229
1 parent 839c1a2 commit 0f2d382

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

content/functions/color-operations.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,33 @@ rgba(75, 25, 0, 0.75)
195195

196196
![Color 1](holder.js/100x40/#ff0000:#ffffff/text:ff0000) + ![Color 2](holder.js/100x40/#0000ff:#ffffff/text:0000ff)![Color 3](holder.js/100x40/#800080:#ffffff/text:800080)
197197

198+
### tint
199+
200+
> Mix color with white in variable proportion. It is the same as calling ``mix(#ffffff, @color, @weight)``
201+
202+
Parameters:
203+
204+
* `color`: A color object.
205+
* `weight`: Optional, a percentage balance point between color and white, defaults to 50%.
206+
207+
Returns: `color`
208+
209+
Example:
210+
211+
```less
212+
no-alpha: tint(#007fff, 50%);
213+
with-alpha: tint(rgba(00,0,255,0.5), 50%);
214+
```
215+
216+
Output:
217+
218+
```css
219+
no-alpha: #80bfff;
220+
with-alpha: rgba(191, 191, 255, 0.75);
221+
```
222+
223+
![Color 1](holder.js/100x40/#ff00ff:#ffffff/text:ff00ff)![Color 2](holder.js/100x40/#ff80ff:#ffffff/text:ff80ff)
224+
198225
### greyscale
199226

200227
> Remove all saturation from a color in the HSL color space; the same as calling `desaturate(@color, 100%)`.

0 commit comments

Comments
 (0)