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 2020-08-05 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{
"last_modified": "Last updated 2020-08-05 UTC.",
"state": ""
}