[whatwg] return lowercase hex values for fillStyle and strokeStyle

Nicholas Shanks contact at nickshanks.com
Tue Sep 5 10:07:35 PDT 2006


On 5 Sep 2006, at 12:54, Charles McCathieNevile wrote:

>>> Instead of returning an uppercase six digit hex value I suggest  
>>> returning a lowercase value for compatibility with what UAs  
>>> (including IE) currently do
>>
>> It may be the right decision on compatibility grounds, but other  
>> than that lowercase hexadecimal digits (0-9, a-f) are almost  
>> always a bad choice, because a, c and e have no ascenders like  
>> every hindu-arabic decimal digit has and thus make the number  
>> harder to read. This obviously does not apply to fonts with old- 
>> style numerals aka. text figures, where 0, 1 and 2 have neither  
>> ascenders (like 6 and 8) nor descenders (like 3, 4, 5, 7 and 9),  
>> but those are rather unlikely to be used in a programming  
>> environment.
>
> I believe this, but I suspect that the gain in compatibility is  
> well worth the minor loss in efficiency for people who are hand- 
> coding.

I disagree, and always prefer uppercase hex digits to lowercase ones,  
it makes the numbers easier to read IMO.

- Nicholas.



More information about the whatwg mailing list