How to calculate the shades of a color?

HSB is indeed the simple way of doing this, but if you want something that is very perceptually uniform, you might want to use CIELAB – which is not built-in, but can be converted into / out of.