GCKColor Class

GCKColor Class Reference

Overview

A class that represents an RGBA color.

Inherits NSObject, <NSCopying>, and <NSCoding>.

Instance Method Summary

(instancetype) - initWithRed:green:blue:alpha:
 Designated initializer. More...
 
(instancetype) - initWithRed:green:blue:
 Constructs a GCKColor object with the given red, green, blue values and an alpha value of 1.0 (full opacity). More...
 
(instancetype) - initWithNSColor:
 Constructs a GCKColor object from an NSColor. More...
 
(instancetype) - initWithCGColor:
 Constructs a GCKColor object from a CGColor. More...
 
(instancetype) - initWithCSSString:
 Constructs a GCKColor object from a CSS string representation in the form "#RRGGBBAA". More...
 
(NSString *) - CSSString
 Returns a CSS string representation of the color, in the form "#RRGGBBAA". More...
 

Class Method Summary

(GCKColor *) + black
 The color black. More...
 
(GCKColor *) + red
 The color red. More...
 
(GCKColor *) + green
 The color green. More...
 
(GCKColor *) + blue
 The color blue. More...
 
(GCKColor *) + cyan
 The color cyan. More...
 
(GCKColor *) + magenta
 The color magenta. More...
 
(GCKColor *) + yellow
 The color yellow. More...
 
(GCKColor *) + white
 The color white. More...
 

Properties

CGFloat red
 
CGFloat green
 
CGFloat blue
 
CGFloat alpha
 

Method Detail

- (instancetype) initWithRed: (CGFloat)  red
green: (CGFloat)  green
blue: (CGFloat)  blue
alpha: (CGFloat)  alpha 

Designated initializer.

Constructs a GCKColor object with the given red, green, blue, and alpha values.

- (instancetype) initWithRed: (CGFloat)  red
green: (CGFloat)  green
blue: (CGFloat)  blue 

Constructs a GCKColor object with the given red, green, blue values and an alpha value of 1.0 (full opacity).

- (instancetype) initWithNSColor: (NSColor *)  color

Constructs a GCKColor object from an NSColor.

TARGET_OS_IPHONE

- (instancetype) initWithCGColor: (CGColorRef)  color

Constructs a GCKColor object from a CGColor.

- (instancetype) initWithCSSString: (NSString *)  CSSString

Constructs a GCKColor object from a CSS string representation in the form "#RRGGBBAA".

- (NSString *) CSSString

Returns a CSS string representation of the color, in the form "#RRGGBBAA".

+ (GCKColor *) black

The color black.

+ (GCKColor *) red

The color red.

+ (GCKColor *) green

The color green.

+ (GCKColor *) blue

The color blue.

+ (GCKColor *) cyan

The color cyan.

+ (GCKColor *) magenta

The color magenta.

+ (GCKColor *) yellow

The color yellow.

+ (GCKColor *) white

The color white.

Google Cast iOS Sender API Reference v 2.10.1 4691