Mdejonge
8/23/2019 - 12:45 PM

Calculate color by tint

The color will be calculated by tint percentage. This tint is used alot in inDesign.

// Slightly lighten a color
// @access public
// @param {Color} $color - color to tint
// @param {Number} $percentage - percentage of `$color` in returned color
// @return {Color}
@function tint($color, $percentage) {
    $percentage: calc(100 - $percentage);
    @return mix(white, $color, $percentage);
}


// Usage
color: tint(#663399, 80);