Hi Andrea,

On Thu, Jul 19, 2012 at 06:36:14PM +0200, Andrea Pescetti wrote:
> 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.

After trying Gimp, KColorChooser and GColor2, the common behaviour is:

- only accept 3 and 6 hex digits
- 3 digits are interpreted as you propose:
  012 -> 001122
  123 -> 112233
- other number of digits (or invalid input, like yrj) is ignored, being
  Gimp the only one that resets the field to the previous valid value.


Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina

Attachment: pgpZ08nEeE4OO.pgp
Description: PGP signature

Reply via email to