[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: color.el
From: |
Drew Adams |
Subject: |
RE: color.el |
Date: |
Sun, 20 Feb 2011 07:44:31 -0800 |
> > IMO, the values should be of the same type (a) for all
> > components (r,g,b,h,s,v), and (b) for both input and
> > return values. We should not be sometimes passing in
> > [0,1] for RGB and other times passing in [0,255] for RGB.
> > Similarly for return values. And we should not use [0,360]
> > for H but [0,1] for S and V.
>
> I agree.
>
> I'd rather not ever use 0-255 in the interface though. _If_ it's
> sometimes desirable to use integers instead of floats for color
> components, 0-65535 gives higher resolution, is already in use by
> Emacs color functions (`color-values'), and can be efficiently (without
> division) converted to 0-255 internally when that range is desirable
> (for backends or whatever).
I agree.