Open ghost opened 7 years ago
I'm not really sure what the problem is. However, when I tried initializing the colors in three different ways, I get the same results.
As you can see, this color is different from the one you will get in photoshop. The result here has an RGB of (232, 98, 42). Where as #EB6E2F
is really (235, 110, 47). Even the native UIColor initializer fails.
The issue I was getting was a mismatch between the color I added in Storyboard, and the color I added programmatically with SweeterColor, not sure if these helps.
On an actual device, it can be quite noticeable.
@jathu I came across this issue about different color spaces.
Do you think this could be related?
Yes I think is related to @ghost 's link Xcode storyboard support various RGB color options.
In my Mac actually Sketch color picker find Author's SweeterColor
color is #EB632F
correctly but Inkscape
and Xcode
related author's option is #FC6509
The color from SweeterColor doesn't match the hex color. Here's a screenshot comparing the colors using
#EB6E2F
set with XCode's storyboard, Inkscape, and SweeterColor:NB: The screenshot colors are more vibrant than they actually are due to GitHub's image compression
To reproduce:
UIView
in Storyboard, set its color to #EB6E2FUIView
in code set the background color. egsweeterColorView.backgroundColor = UIColor(hex: "#EB6E2F")