Re: Common standard for defining a color?
| From: | Stefan Neufeind | Date: | Tue, 03 Feb 2004 18:39:33 +0000 |
| Subject: | Re: Common standard for defining a color? | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-25458@lists.php.net to get a copy of this message | ||
On 3 Feb 2004 at 19:23, Bertrand Mansion wrote:
> <pear-dev@mocsnik.hu> 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..).
>
> What about rgba(0-255, 0-255, 0-255, 0-100) with a = 100 default ?
Well, why 100? To have percentages? I'd favor to have all values of
equal size (here 0 to 255 in this case). Wouldn't that make more
sense? imagecolorallocatealpha uses 0 to 127 :-((. But others (Pimp,
SVG, ...) might even do it completely different. In tools like
photoshop etc. afaik a value of 0..255 for alpha is normal, like for
any other of those color channels.
Stefan