iphone Programming Glossary: hsb
Objective-C RGB to HSB http://stackoverflow.com/questions/2591013/objective-c-rgb-to-hsb C RGB to HSB Let's say I've got the colour FF0000 which is red. Finding a darker colour is easy I just type maybe CC instead of the.. would I find a lighter or darker version of it automatically I figured the easy way to do this is to convert my RGB to HSB Hue Saturation Brightness How would I do that in Objective C Let's say I've got a RGB which is 1.0 0.0 0.0. That's red... I've got a RGB which is 1.0 0.0 0.0. That's red. CGFloat r 1.0 CGFloat g 0.0 CGfloat b 0.0 How would I convert that to HSB and then transform the colors and make it go back to RGB to I can use CGContextRGBSetFillColor Are there any HSB functions..
Change from RGB to HSB on iPhone? http://stackoverflow.com/questions/5589804/change-from-rgb-to-hsb-on-iphone from RGB to HSB on iPhone I've googled for ages and can't find a way to do this. Anybody got an idea There is an NSColor way of doing it.. The idea in my app is that the user types in a HEX code which i have managed to get into RGB and it's changed into HSB. Ideas iphone objective c colors uicolor share improve this question It just takes a little bit of math. The following.. a little bit of math. The following code is just the important parts of the custom class I created for conversion. The HSBColor class stores just the hue saturation and brightness and I provide functions to get the components of it or a UIColor..
|