How are tint and shade being calculated?

I was playing around with the color generator and was wondering how the tint and shade colors are being calculated? I tried all sorts of different color manipulations using the color library but never ended up getting the same result.

Thanks!