i've got my function:
-(void)rgbToHSBWithR:(float)red G:(float)green B:(float)blue {
float brightness = red * 0.3 + green * 0.59 + blue * 0.11; // found in stackoverflow
NSLog(@"%f",brightness);
}
and it isn't work for me.
for example: r:84 g:67 b:73. function return 72.760002. In Photoshop brightness for this color is 33%. What's wrong?
Thanks.