GCKColor Class
Stay organized with collections
Save and categorize content based on your preferences.
A class that represents an RGBA color.
Inherits NSObject, <NSCopying>, and <NSSecureCoding>.
|
CGFloat | red |
| The red intensity of the color; a value in the range [0.0, 1.0]. More...
|
|
CGFloat | green |
| The green intensity of the color; a value in the range [0.0, 1.0]. More...
|
|
CGFloat | blue |
| The blue intensity of the color; a value in the range [0.0, 1.0]. More...
|
|
CGFloat | alpha |
| The alpha (transparency) of the color; a value in the range [0.0, 1.0]. More...
|
|
- (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. All color components are in the range [0.0, 1.0].
- (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).
All color components are in the range [0.0, 1.0].
- (instancetype) initWithUIColor: |
|
(UIColor *) |
color |
|
Constructs a GCKColor object from a UIColor.
- (instancetype) initWithCGColor: |
|
(CGColorRef) |
color |
|
Constructs a GCKColor object from a CGColor.
Constructs a GCKColor object from a CGColor and a given alpha value.
- Since
- 4.0
- (instancetype) initWithCSSString: |
|
(NSString *) |
CSSString |
|
Constructs a GCKColor object from a CSS string representation in the form "#RRGGBBAA" or "#RRGGBB".
Returns a CSS string representation of the color, in the form "#RRGGBBAA".
The red intensity of the color; a value in the range [0.0, 1.0].
The green intensity of the color; a value in the range [0.0, 1.0].
The blue intensity of the color; a value in the range [0.0, 1.0].
The alpha (transparency) of the color; a value in the range [0.0, 1.0].
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[],[]]