On Monday, 10 October 2016 at 23:26:53 UTC, Manu wrote:
I'm not sure why it matters what format the colour you have is...
Strings are in the form #RRGGBB, or #AARRGGBB. That is all.
It's the standard I've seen used everywhere ever, including the web,
which is a pretty good precedent :P

If the web is a good precedent (CSS4 specs):
"The first 6 digits are interpreted identically to the 6-digit notation. The last pair of digits, interpreted as a hexadecimal number, specifies the alpha channel of the color, where 00 represents a fully transparent color and ff represent a fully opaque color."


CSS3 doesn't support hex string with alpha but they suggest you to use rgba() function. I think argb() doesn't exists instead.

Chrome 52 supports it:

Android instead:
"Parse the color string, and return the corresponding color-int. If the string cannot be parsed, throws an IllegalArgumentException exception. Supported formats are: #RRGGBB #AARRGGBB [...]"

Please notice that on PNG file format rgba is quite common (also on bmp with semi-official apha support)
PNG: http://www.libpng.org/pub/png/book/chapter08.html

Reply via email to