Re: Common standard for defining a color?

From: Date: Tue, 03 Feb 2004 18:36:51 +0000
Subject: Re: Common standard for defining a color?
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-25456@lists.php.net to get a copy of this message
On 3 Feb 2004 at 19:09, Norbert Mocsnik wrote: > Pierre-Alain Joye wrote: > > integer value for RGB(A), fast and nice :) > > Besides that, please check Image_Transfrom. It seems most of the > > stuffs are already there too. And we may use it when possible. > > Please notice that there is a pending huge commit from Peter :). > Image_Transform doesn't support other formats such as CMYK and it > works with only RGB values (web colors like #ffccaa). See the > apropriate functions in Transform.php itself, and color definitions in > Driver/ColorDefs.php. > http://cvs.php.net/cvs.php/pear/Image_Transform/ > > Actually I vote on the idea of Stephan Wentz. > array( > "cmyk" => array(1,2,3,4), > "rgb" => array(3,5,4), > "alpha" => array(1) > ); > > It would be nice if single-values like alpha wouldn't be arrays > (however it shouldn't be wrong to pass that single value in an > array..). Why do we need both representations at once? When you know in which representation-format the array is (cymk, rgb, ...) you can easily call a "color2rgb" or something that will magically offer you a rgb- color in your class, no matter what color it was before. Stefan

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