jathu / sweetercolor

A color extension for Swift with Photoshop blending.
http://jathu.me/sweetercolor
MIT License
149 stars 16 forks source link

SweeterColor darker than actual color #7

Open ghost opened 7 years ago

ghost commented 7 years ago

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:

sweet

NB: The screenshot colors are more vibrant than they actually are due to GitHub's image compression

To reproduce:

  1. Create one UIView in Storyboard, set its color to #EB6E2F
  2. Create another UIView in code set the background color. eg sweeterColorView.backgroundColor = UIColor(hex: "#EB6E2F")
  3. Open Adobe PS or Inkscape, set the canvas color to #EB6E2F
  4. Use the macOS Digital Color Meter again, the color from XCode and Adobe PS is correct, but SweeterColor has the wrong color
jathu commented 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.

1

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.

ghost commented 7 years ago

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.

ghost commented 7 years ago

@jathu I came across this issue about different color spaces.

https://stackoverflow.com/questions/27628473/uinavigationbar-background-color-setted-from-storyboard-differ-from-the-color-se

Do you think this could be related?

cruisediary commented 5 years ago

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 SweeterColorcolor is #EB632F correctly but Inkscape and Xcode related author's option is #FC6509