incubator-ooo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrea Pescetti <pesce...@apache.org>
Subject Re: [UI] ColorPicker - entering hex color code
Date Thu, 19 Jul 2012 16:36:14 GMT
Ariel Constenla-Haile wrote:
> If I enter AA, I would expect it to be #0000AA, that is, zeros added at
> the left.
> AA ->  0000AA ->  RBG 0,0,170
> but the color picker shows RGB 170,170,170  ...
> Which should be the expected behaviour?

What I would expect is:

ABC -> AABBCC

This is the (unnatural for programmers, but popular) CSS shorthand 
hexadecimal notation used in web pages.

And with fewer than three digits, convert to grayscale:

AB -> ABABAB

A -> 0A -> 0A0A0A

With 4-5 digits, return an error.

But like your following examples show, this is highly subjective (even 
though the three-digit pattern seems rather consistent).

I think the proposal above makes sense because people used to handle 
hexadecimal color values are likely to use one hex value to mean a shade 
of grey or three hex digits for the shorthand hex notation.

Regards,
   Andrea.

Mime
View raw message