I have this SCSS: background-color: lighten($baseColor, 15%);
And we're converting our codebase to styled-components using inline CSS:
export const animateLoading = ({ baseColor, speed = "700ms" }) => css`
  &:after {
    background-color: lighten(${baseColor}, 15%);
    // etc
  }
`;
But styled-components uses CSS not SASS so the lighten function doesn't work. Does anyone know what that function does, like mathematically or something, such that I can write a JS function to get the same result?
Update:
Thanks to commenters I've written this, but it's not working. I'm not seeing any color at all:
export const animateLoading = ({ baseColor, speed = "700ms" }) => css`
  &:after {
    --color: ${baseColor};
    background-color: hsl(var(--color), 15%);
    // ...
  }
`;
