UIColor(ADKHexPresentation) Category Reference
Declared in | UIColor+ADKHexPresentation.h UIColor+ADKHexPresentation.m |
---|
+ ADKColorWithHexRed:green:blue:alpha:
Create a color by hex format.
+ (UIColor *)ADKColorWithHexRed:(NSUInteger)red green:(NSUInteger)green blue:(NSUInteger)blue alpha:(CGFloat)alpha
Parameters
red |
Red channel value with hex NSUInteger. |
---|---|
green |
Green channel value with hex NSUInteger. |
blue |
Blue channel value with hex NSUInteger. |
alpha |
Alpha channel value with hex. |
Return Value
The instance of UIColor.
Declared In
UIColor+ADKHexPresentation.h
– ADKInitWithHexRed:green:blue:alpha:
Create a color by hex format.
- (UIColor *)ADKInitWithHexRed:(NSUInteger)red green:(NSUInteger)green blue:(NSUInteger)blue alpha:(CGFloat)alpha
Parameters
red |
Red channel value with hex NSUInteger. |
---|---|
green |
Green channel value with hex NSUInteger. |
blue |
Blue channel value with hex NSUInteger. |
alpha |
Alpha channel value with hex. |
Return Value
The instance of UIColor.
Declared In
UIColor+ADKHexPresentation.h
+ ADKColorWithHexString:
Create a color by hex string. The returned color is undefined if hexString is invalid. The behaviour is the same as ADKColorWithRGBHexString:, but ADKColorWithRGBHexString: is preferred.
+ (UIColor *)ADKColorWithHexString:(NSString *)hexString
Parameters
hexString |
The value of hex NSString. |
---|
Return Value
The instance of UIColor.
Declared In
UIColor+ADKHexPresentation.h
+ ADKColorWithHexString:alpha:
Create a color by hex string and alpha.
+ (UIColor *)ADKColorWithHexString:(NSString *)hexString alpha:(CGFloat)alpha
Parameters
hexString |
The value of hex NSString. |
---|---|
alpha |
The value of alpha NSString. |
Return Value
The instance of UIColor.
Declared In
UIColor+ADKHexPresentation.h
– ADKInitWithHexString:
Create a color by hex string.
- (UIColor *)ADKInitWithHexString:(NSString *)hexString
Parameters
hexString |
The value of hex NSString. |
---|
Return Value
The instance of UIColor.
Declared In
UIColor+ADKHexPresentation.h
+ ADKColorWithRGBHexString:
Create a RGB color by hex string. The returned color is undefined if hexString is invalid. The behaviour is the same as ADKColorWithHexString:.
+ (UIColor *)ADKColorWithRGBHexString:(NSString *)hexString
Parameters
hexString |
The value of RGB hex NSString. |
---|
Return Value
The instance of UIColor.
Declared In
UIColor+ADKHexPresentation.h
+ ADKColorWithARGBHexString:
Create a ARGB or RGB color by hex string. The returned color is undefined if hexString is invalid.
+ (UIColor *)ADKColorWithARGBHexString:(NSString *)hexString
Parameters
hexString |
The value of ARGB or RGB hex NSString. |
---|
Return Value
The instance of UIColor.
Declared In
UIColor+ADKHexPresentation.h
+ ADKColorWithRGBAHexString:
Create a RGBA or RGB color by hex string. The returned color is undefined if hexString is invalid
+ (UIColor *)ADKColorWithRGBAHexString:(NSString *)hexString
Parameters
hexString |
The value of RGBA or RGB hex NSString. |
---|
Return Value
The instance of UIColor.
Declared In
UIColor+ADKHexPresentation.h
+ ADKColorWithHexNumber:
Create a color by hex number.
+ (UIColor *)ADKColorWithHexNumber:(NSUInteger)hexNumber
Parameters
hexNumber |
The value of hex NSUInteger. |
---|
Return Value
The instance of UIColor.
Declared In
UIColor+ADKHexPresentation.h
– ADKInitWithHexNumber:
Create a color by hex number.
- (UIColor *)ADKInitWithHexNumber:(NSUInteger)hexNumber
Parameters
hexNumber |
The value of hex NSUInteger. |
---|
Return Value
The instance of UIColor.
Declared In
UIColor+ADKHexPresentation.h
– ADKColorShiftBySaturation:
Shift saturation from exist color to create a new color.
- (UIColor *)ADKColorShiftBySaturation:(CGFloat)shiftValue
Parameters
shiftValue |
The value of saturation needs to shift. Shift value can include positive or negative float and saturation must between 0.0f and 1.0f. |
---|
Return Value
The instance of UIColor.
Declared In
UIColor+ADKHexPresentation.h
– ADKColorShiftByBrightness:
Shift brightness from exist color to create a new color. Shift value should be float.
- (UIColor *)ADKColorShiftByBrightness:(CGFloat)shiftValue
Parameters
shiftValue |
The value of brightness needs to shift. Shift value can include positive or negative float and brightness must between 0.0f and 1.0f. |
---|
Return Value
The instance of UIColor.
Declared In
UIColor+ADKHexPresentation.h
– ADKIsEqualToColor:
comparing colors that are in different models/spaces
- (BOOL)ADKIsEqualToColor:(UIColor *)anotherColor
Parameters
anotherColor |
The UIColor which is comparing |
---|
Return Value
YES if they are the same one
Declared In
UIColor+ADKHexPresentation.h
– ADKHexString
Generate a HEX string for UIColor .
- (NSString *)ADKHexString
Return Value
A NSString with HEX format.
Declared In
UIColor+ADKHexPresentation.h