Tag: hsb

Objective-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 FF, but let’s say I’ve got the colour AE83FC, which is a complicated colour, how the heck would I find a lighter or darker version of it automatically? I figured the […]

Is there function to convert UIColor to Hue Saturation Brightness?

i can set uicolor with RGB values: [UIColor colorWithRed:0.53 green:0.37 blue:0.11 alpha:1.00]; i can set uicolor with hsb values: [UIColor colorWithHue:0.10 saturation:0.16 brightness:0.13 alpha:1.00]; i also could convert it back to RGB: CGFloat* colors = CGColorGetComponents(Color1.CGColor); But how i can get HSB from uicolor?