Objective-C API Library Reference  4.3.0-42-g45f162a
 All Classes Functions Typedefs Properties Pages
Public Functions | Public Static Functions | Properties | List of all members
PWColor Class Reference

The PWColor class represents of a color in terms of alpha, red, green, and blue components. PureWeb colors are the same across platforms. They are used by the acetate tools to display markup on view overlays. For more information on the acetate functionality, see PWAcetateToolDelegate.

Public Functions

(NSString *) - colorString
 
(int) - convertToAbgr
 
(int) - convertToArgb
 
(UIColor *) - uiColor
 

Public Static Functions

(PWColor *) + colorWithArgb:r:g:b:
 
(PWColor *) + colorWithRgb:g:b:
 
(PWKnownColor) + convertKnownColorStringToEnum:
 
(PWColor *) + fromHexString:
 
(PWColor *) + fromKnownColor:
 
(PWColor *) + fromKnownName:
 
(BOOL) + isValidColor:
 

Properties

Byte a
 
Byte b
 
Byte g
 
Byte r
 

Methods Descriptions

- (NSString *) colorString

Returns the PureWebColor object, expressed as an hexadecimal string.

+ (PWColor *) colorWithArgb: (Byte)  a
r: (Byte)  r
g: (Byte)  g
b: (Byte)  b 

Parses a string in ARGB format into a PureWeb color.

+ (PWColor *) colorWithRgb: (Byte)  r
g: (Byte)  g
b: (Byte)  b 

Parses a string in RGB format into a PureWeb color.

+ (PWKnownColor) convertKnownColorStringToEnum: (NSString *)  color

Returns a PureWeb color from the specified known color.

- (int) convertToAbgr

Returns the color as an ABGR (alpha, blue, green, red) value.

- (int) convertToArgb

Returns the color as an ARGB (alpha, red, green, blue) value.

+ (PWColor *) fromHexString: (NSString *)  hexString

Returns a PureWeb color from the specified hexadecimal string.

+ (PWColor *) fromKnownColor: (PWKnownColor)  color

Returns a PureWeb color from the specified known color.

+ (PWColor *) fromKnownName: (NSString *)  color

Returns a PureWeb color from the specified known color name (case is ignored).

+ (BOOL) isValidColor: (NSString *)  colorString

Returns a Boolean value that indicates whether the specified color string is a known PureWeb color.

- (UIColor *) uiColor

Returns an Objective-C UIColor object.

Properties Descriptions

- (Byte) a
readwritenonatomicassign

The alpha component of the color. A value of 0 is completely transparent, a value of 255 is completely opaque.

- (Byte) b
readwritenonatomicassign

The blue component of the color.

- (Byte) g
readwritenonatomicassign

The green component of the color.

- (Byte) r
readwritenonatomicassign

The red component of the color.