¡@

Home 

2014/10/15 ¤U¤È 10:10:07

iphone Programming Glossary: hsbcolor

Change from RGB to HSB on iPhone?

http://stackoverflow.com/questions/5589804/change-from-rgb-to-hsb-on-iphone

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 if.. if I need to actually use it for something in the system. Note This code will not work as is unless you define an HSBColor class with hue brightness and saturation properties. void max int max andMin int min ofArray float array min 0 max 0 for.. int min ofArray float array min 0 max 0 for int i 1 i 3 i if array i array max max i if array i array min min i HSBColor colorWithRed float red Green float green Blue float blue HSBColor toReturn HSBColor alloc init autorelease float colorArray..