app/assets/stylesheets/_functions.scss
// Custom functions are like mixins but they don't set CSS properties directly.
// Color functions for adjusting shade, tint, and opacity of a color.
@function darkest($color, $opacity:'') {
@if type-of($opacity) == number{@return rgba(shade($color, 50), $opacity)}
@return shade($color, 50);
}
@function dark($color, $opacity:'') {
@if type-of($opacity) == number{@return rgba(shade($color, 25), $opacity)}
@return shade($color, 25);
}
@function midtone($color, $opacity:'') {
@if type-of($opacity) == number{@return rgba($color, $opacity)}
@return $color;
}
@function light($color, $opacity:'') {
@if type-of($opacity) == number{@return rgba(tint($color, 25), $opacity)}
@return tint($color, 25);
}
@function lightest($color, $opacity:'') {
@if type-of($opacity) == number{@return rgba(tint($color, 50), $opacity)}
@return tint($color, 50);
}