export function getNegativeColor()

in src/components/typography.tsx [146:162]


export function getNegativeColor(color: string): string {
  const colors = color
    .substr(0, color.length)
    .split('rgb(')[1]
    .split(',')
    .map(c => +c);

  let R = +colors[0];
  let G = Math.floor(+colors[1] * 1.8);
  let B = Math.floor(+colors[2] * 1.8);

  R = R < 255 ? R : 255;
  G = G < 255 ? G : 255;
  B = B < 255 ? B : 255;

  return `rgb(${R},${G},${B})`;
}