All files / src/utils colors.ts

80% Statements 12/15
100% Branches 0/0
100% Functions 5/5
80% Lines 12/15

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48                  13632x 13632x   3x         11568x 11568x             46272x 46272x             10122x 10122x             45090x 45090x   43x      
import {
  darken as _darken,
  lighten as _lighten,
  shade as _shade,
  readableColor as _readableColor,
  tint as _tint
} from 'polished';
 
export function darken(scale, color) {
  try {
    return _darken(scale, color);
  } catch (err) {
    return undefined;
  }
}
 
export function lighten(scale, color) {
  try {
    return _lighten(scale, color);
  } catch (err) {
    return undefined;
  }
}
 
export function shade(scale, color) {
  try {
    return _shade(scale, color);
  } catch (err) {
    return undefined;
  }
}
 
export function readableColor(color) {
  try {
    return _readableColor(color);
  } catch (err) {
    return undefined;
  }
}
 
export function tint(scale, color) {
  try {
    return _tint(scale, color);
  } catch (err) {
    return undefined;
  }
}