I probably would use scanf
and then &
with 0xff, 0xff00, 0xff0000
and shift them to get the 3 values for RGB and then call [UIColor colorWithRed: green: blue: alpha: 1]
. Is there a better or easy way to implement it?
The #
in front should be optional in the string, and it shouldn't be case sensitive so 3a6ffc
should work as well as #3A6FFC
.