Skip to content

Commit 092a227

Browse files
authored
Merge pull request #1 from EverlyWell/hexfix
Bugfix in hex string color decoding
2 parents c0d4e57 + 1f46bba commit 092a227

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ColorKit/ColorKit/Hex.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ extension UIColor {
2727
case 6: // 0xRRGGBB
2828
(a, r, g, b) = (255, hexValue >> 16, hexValue >> 8 & 0xFF, hexValue & 0xFF)
2929
case 8: // 0xRRGGBBAA
30-
(a, r, g, b) = (hexValue >> 24, hexValue >> 16 & 0xFF, hexValue >> 8 & 0xFF, hexValue & 0xFF)
30+
(r, g, b, a) = (hexValue >> 24, hexValue >> 16 & 0xFF, hexValue >> 8 & 0xFF, hexValue & 0xFF)
3131
default:
3232
(a, r, g, b) = (255, 0, 0, 0)
3333
}

0 commit comments

Comments
 (0)