Skip to content

Commit 7f0e9ae

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

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
@@ -222,6 +222,33 @@ with-alpha: rgba(191, 191, 255, 0.75);
222222

223223
![Color 1](holder.js/100x40/#ff00ff:#ffffff/text:ff00ff)![Color 2](holder.js/100x40/#ff80ff:#ffffff/text:ff80ff)
224224

225+
### shade
226+
227+
> Mix color with black in variable proportion. It is the same as calling ``mix(#ffffff, @color, @weight)``
228+
229+
Parameters:
230+
231+
* `color`: A color object.
232+
* `weight`: Optional, a percentage balance point between color and black, defaults to 50%.
233+
234+
Returns: `color`
235+
236+
Example:
237+
238+
```less
239+
no-alpha: shade(#007fff, 50%);
240+
with-alpha: shade(rgba(00,0,255,0.5), 50%);
241+
```
242+
243+
Output:
244+
245+
```css
246+
no-alpha: #004080;
247+
with-alpha: rgba(0, 0, 64, 0.75);
248+
```
249+
250+
![Color 1](holder.js/100x40/#ff00ff:#ffffff/text:ff00ff)![Color 2](holder.js/100x40/#800080:#ffffff/text:800080)
251+
225252
### greyscale
226253

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

0 commit comments

Comments
 (0)