Hi, 
I am currently working on (and have nearly finished) a set of classes that
provide an object oriented way of accessing and working with colours,
currently names “Jack_Color”. This component:

* Supports RGB, HSL and HSB (HSV) colour spaces
* Supports conversion between RGB<>HSL and RGB<>HSV
* Provides a consistent API for manipulating colour variables (red, green,
blue, hue, saturation, lightness etc.)
* Provides methods to perform other colour modifications, e.g. invert
* Provides helper functions for working with colours in hex format, and
working with the standard named hex colours
* Provides helper functions for writing out CSS compatible colour unit
strings (rgb(0,0,0) etc.)
* Provides methods to make a colour web safe or web smart
* Provides methods to test colours for W3C visibility compliance
* Provides an interface for creating colour gradients

There are four basic classes: Jack_Color_Rgb, Jack_Color_Hsl,
Jack_Color_Hsb, Jack_Color_Gradient, as well as a helper class (Jack_Color)
which contains a couple of static methods. The Jack_Color_Rgb class is the
primary class that most people would use, and contains the methods for W3C
compliance and web safe/web smart.

The component can be extended to support other colour spaces/models, and
other colour manipulation functions. I also intend to add CMYK support (with
conversion to and from RGB) as well, which could be handy to Zend_Pdf users
perhaps?

If you guys are interested I would be happy to contribute this to ZF, and
write up a proposal. Let me know what you think.

Thanks, 
Jack
-- 
View this message in context: 
http://www.nabble.com/Zend_Color-Component--tf4044723s16154.html#a11489320
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to