Formula to get the accents in material design

We see here the palette of material design:

https://material.io/guidelines/style/color.html#color-color-palette

We see colors are at "500" and then they have gradations at 50, 100, and then A100, A200, etc.

What is the formula to get from say 500 to 50? Is it desaturate by 50% and lighten it by 10%? Or spinning the hue? I am using the color modification functions here - https://github.com/bgrins/TinyColor#color-modification - which should match with w3 standards.

For instance Teal 500 is #009688 and Teal 100 is #B2DFDB. What is the formula to get from 500 to 100 here?

The reason I ask is because in my app users can set a custom app theme, the color can be any color. But I want to make the gradations respect material design, as everything except the color is material in the app.

Thanks