On Friday, 2016-10-21 12:30:07 +0200, Quentin Glidic wrote: > Hi, > > On 20/10/2016 00:08, Eric Engestrom wrote: > > Valid colours start with an optional '0x' or '#', followed by: > > - AARRGGBB > > - RRGGBB > > - A R G B > > - R G B > > - XYXYXY > > - XXXXXX > > I think this is way too much, even with minimal code effort. > > The well-known CSS formats are #RRGGBB and #RGB, and the backward-compatible > extension are #RRGGBBAA and #RGBA. > The current 0xAARRGGBB are directly derived from the internal usage of a > colour as a number, because Weston devs are used to this. But *users* are > not, they are used to CSS notation. > > IMO, 0x should be used as-is, with a little clamping, so the old way > continue to work. OTOH, the # notation should be fully compatible with CSS. > > This code would lead to user-unexpected behaviour, and it’s easy to avoid > that.
You're right, I didn't really think this through :) I'll send a v2 with only commonly used formats/orders when I have some more time (probably sunday): - (0x)(AA)RRGGBB (backward compatibility) - #RGB(A) - #RRGGBB(AA) Bryce, I think you wanted a single repeating char format; do you also want the 2-char format? Cheers, Eric _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel