JSFiddle - React, Tailwind, and code Playground

by Raphael Quintao

SCSS

@function shade($color, $p) {
  @if $p >= 1 {
    @return mix(white, $color, percentage(-1 + $p));
  }
  // @return change-color($color, $lightness: percentage($p/2));
}

html {
  $p: 1.5;
  background: shade(red, 1.9);
  ok: percentage(-1 + $p);
  ok2: $p % 2;
}


@debug scale-color(#998099, $alpha: -40%);