swhitty/SwiftDraw

padHex #a5F should be parsed as #aa55FF

mk-wang opened this issue · 2 comments

According to https://www.w3.org/TR/css-color-3/#colorunits

The format of an RGB value in hexadecimal notation is a ‘#’ immediately followed by either three or six hexadecimal characters. The three-digit RGB notation (#rgb) is converted into six-digit form (#rrggbb) by replicating digits, not by adding zeros. For example, #fb0 expands to #ffbb00. This ensures that white (#ffffff) can be specified with the short notation (#fff) and removes any dependencies on the color depth of the display.

🙏🏼 thank you for reporting and fixing this @mk-wang. This has been merged to develop and will be included in the next release.

Included within 0.15.0 release