My ques may be silly. Is there an hexa code for [UIColor clearColor]
? If so, what is the code? Thanks in advance.
RGBA Hex Code for ClearColor:
NNNNNN00
whereas N may be any hex-value (0-F).
UIColor *clearColor = [UIColor clearColor];
CGFloat red = 0;
CGFloat green = 0;
CGFloat blue = 0;
CGFloat alpha = 0;
[clearColor getRed:&red green:&green blue:&blue alpha:&alpha];
NSLog(@"red: %.3f, green: %.3f, blue: %.3f, alpha: %.3f",
red, green, blue, alpha);
NSLog(@"red: 0x%02x, green: 0x%02x, blue: 0x%02x, alpha: 0x%02x",
(int)(red*255.0), (int)(green*255.0), (int)(blue*255.0), (int)(alpha*255.0));
NSLog output:
red: 0.000, green: 0.000, blue: 0.000, alpha: 0.000
red: 0x00, green: 0x00, blue: 0x00, alpha: 0x00
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With