GCKColor 类
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
继承 NSObject、<NSCopy> 和 <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 |
|
|
| |
指定的初始化程序。
使用指定的 red、green、blue 和 alpha 值构造 GCKColor 对象。所有颜色分量都在 [0.0, 1.0] 范围内。
- (instancetype) initWithRed: |
|
(CGFloat) |
red |
green: |
|
(CGFloat) |
green |
blue: |
|
(CGFloat) |
blue |
|
|
| |
使用指定的红色、绿色、蓝色值和 1.0(完全不透明度)的 alpha 值构造 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] 之间的值。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):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"]],["最后更新时间 (UTC):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"]]