Re: Color Class

From: Date: Mon, 26 Nov 2001 13:04:05 +0000
Subject: Re: Color Class
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-3102@lists.php.net to get a copy of this message
On Mon, 26 Nov 2001 13:23:38 +0100 "Tomas V.V.Cox" <cox@idecnet.com> wrote: > Martin Jansen wrote: > > > > On Sun, 25 Nov 2001 18:34:46 -0500, Jason Lotito wrote: > > > > >It's a rather simple class, and right now it allows you to mix colors, > > >as well as find color ranges (You want to grab 10 colors from FF0000 to > > >0000FF) and even change the hue of colors currently contained (making > > >rainbow effects relatively easy). > > > > Did you have a look at php4/pear/Experimental/Image? Perhaps you can > > merge your code with the already existing stuff? > > > > I like the "esoteric" idea of a PEAR_Color class. Thinking on it more in > deep, we could have "abstracted" colors. For ex: > > $PEAR_Colors = array( > 'red' => array( > 'hex' => '222222', > 'rgb' => '34,34,34', > 'console' => '01;31' > ) > ); > > So you could use the PEAR color 'red' in whatever environment you are: > web, php-gtk or bash. It will probably more flexible to not store all differents colors value in the same array. There are many colors standart (Rasmus told us about cmyk and spots b.e.) and maybe pantone and others stuffs like that. The array will grow too much. One array per colortype PEAR_Colors_RGB PEAR_Colors_CMYK,... ? We don't need to include all colors and maybe more modular. hth pa -- Pierre-Alain Joye Freelance Developpements et Services web/intranet pajoye@tuxfamily.org

« previous php.pear.dev (#3102) next »