|
|
|
|
|
by rudedogg
3496 days ago
|
|
I did the same thing for a color app I built for adjusting CSS values using a color wheel. Dealing with color is tricky, I'm sure I made a lot of mistakes.. One interesting bug I think I found is with NSColor/UIColor. If you set the hue for a color, and then proceed to drop the saturation/brightness to 100%/0%, it'll wipe out the hue when you change the saturation/brightness back to sensible values. It could just be something with color spaces that I don't understand, but it seems like a bug to me (data is destroyed). I read a lot about color working on that app, and it is a pretty deep subject. You can read all about the science aspects of color, light spectrums etc. Then you read something else and realize that color is just a human sense, that is all about perception and not set in stone. All the color spaces and representations seem to have their flaws and certain adjustments don't match expectations. To summarize I tried to learn and understand color, but in the end it all seems like a mess. I don't have an academic background, so maybe this is just a lack of understanding. |
|
So basically, if you're writing an application that exposes HSB colors to the user, you should be storing the HSB values yourself rather than relying on UIColor/NSColor to preserve them, because it won't.