Over the last month I’ve been working a colour manipulation library for PHP called MrColor. Please forgive the American spelling, it is the language of the web after all.
The library is built around the idea of having an easy way to work with colour data. Once a new Color object is created you can populate it with colour values, edit those values, use those values to generate new data, and retrieve the colour in the format you require. You can download it or fork it from GitHub here: