RE: [PEAR-DEV] Color Class
| From: | Jason Lotito | Date: | Mon, 26 Nov 2001 13:07:36 +0000 |
| Subject: | RE: [PEAR-DEV] Color Class | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-3104@lists.php.net to get a copy of this message | ||
> > > 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.
Oh, believe you me, the idea of throwing Pantone into the mix, along
with CMYK did cross my mind. I am going to take a look at
php4/pear/Experimental/Image (didn't see it before) and will take a
moment to go back an look at my own code, and then decide what to do
from there.
I like Thomas's idea of having Abstracted colors, but not to the point
of storing every color type in the same array. Some conversion can
easily be done on the fly.
Jason Lotito
jason@lehighweb.com
www.NewbieNetwork.net