GCKColor 類別
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
繼承 NSObject、<NSclone> 和 <NSSecureCoding>。
|
CGFloat | red |
| 顏色的紅色強度;範圍是 [0.0, 1.0] 之間的值。更多...
|
|
CGFloat | green |
| 顏色的綠色強度;範圍是 [0.0, 1.0] 之間的值。更多...
|
|
CGFloat | blue |
| 顏色的藍色強度;範圍是 [0.0, 1.0] 之間的值。更多...
|
|
CGFloat | alpha |
| 顏色的 Alpha (透明度);範圍 [0.0, 1.0] 中的值。更多...
|
|
- (instancetype) initWithRed: |
|
(CGFloat) |
red |
green: |
|
(CGFloat) |
green |
blue: |
|
(CGFloat) |
blue |
alpha: |
|
(CGFloat) |
alpha |
|
|
| |
指定初始化器。
使用指定的紅色、綠色、藍色和 Alpha 值建構 GCKColor 物件。所有顏色元件都在 [0.0, 1.0] 的範圍內。
- (instancetype) initWithRed: |
|
(CGFloat) |
red |
green: |
|
(CGFloat) |
green |
blue: |
|
(CGFloat) |
blue |
|
|
| |
建構具有指定紅色、綠色、藍色值以及 Alpha 值為 1.0 (完整不透明度) 的 GCKColor 物件。
所有顏色元件都在 [0.0, 1.0] 的範圍內。
- (instancetype) initWithUIColor: |
|
(UIColor *) |
color |
|
- (instancetype) initWithCGColor: |
|
(CGColorRef) |
color |
|
從 CGColor 和指定的 Alpha 值建構 GCKColor 物件。
- 開始時間
- 4.0
- (instancetype) initWithCSSString: |
|
(NSString *) |
CSSString |
|
以「#RRGGBBAA」或「#RRGGBB」格式的 CSS 字串表示法建構 GCKColor 物件。
以「#RRGGBBAA」的格式傳回表示顏色的 CSS 字串。
顏色的紅色強度;範圍是 [0.0, 1.0] 之間的值。
顏色的綠色強度;範圍是 [0.0, 1.0] 之間的值。
顏色的藍色強度;範圍是 [0.0, 1.0] 之間的值。
顏色的 Alpha (透明度);範圍 [0.0, 1.0] 中的值。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2023-12-02 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2023-12-02 (世界標準時間)。"],[[["The `GCKColor` class represents an RGBA color, inheriting from `NSObject`, `NSCopying`, and `NSSecureCoding`."],["It provides various initializers to create colors from RGBA values, `UIColor`, `CGColor`, and CSS strings."],["Class methods offer convenient access to predefined colors like black, red, green, blue, cyan, magenta, yellow, and white."],["Properties `red`, `green`, `blue`, and `alpha` allow access to the color components."],["`CSSString` instance method provides a CSS string representation of the color."]]],["The `GCKColor` class represents an RGBA color. Key actions include initializing `GCKColor` objects using red, green, blue, and alpha values; from `UIColor` or `CGColor`; or from CSS strings (#RRGGBBAA or #RRGGBB). Methods return a CSS string representation of the color and allow initialization with an alpha value. Class methods provide predefined colors like black, red, green, blue, cyan, magenta, yellow, and white. Properties represent red, green, blue, and alpha intensities within the range [0.0, 1.0].\n"]]