I've thrown together a neat little color space manipulation class for PHP that I call ColorCreator. Admittedly it appears there's a fairly nasty bug in it at the moment and it currently only handles HSL and RGB values but I'm working on it.
Feel free to try it out, just avoid the rgbToHSL function for now…