Kelas GCKColor
Class yang merepresentasikan warna RGBA.
Mewarisi NSObject, <NSWriting>, dan <NSSecureCoding>.
|
CGFloat | red |
| Intensitas warna merah; nilai dalam rentang [0.0, 1.0]. Lainnya...
|
|
CGFloat | green |
| Intensitas warna hijau; nilai dalam rentang [0,0, 1,0]. Lainnya...
|
|
CGFloat | blue |
| Intensitas warna biru; nilai dalam rentang [0,0, 1,0]. Lainnya...
|
|
CGFloat | alpha |
| Alfa (transparansi) warna; nilai dalam rentang [0.0, 1.0]. Lainnya...
|
|
- (instancetype) initWithRed: |
|
(CGFloat) |
red |
green: |
|
(CGFloat) |
green |
blue: |
|
(CGFloat) |
blue |
alpha: |
|
(CGFloat) |
alpha |
|
|
| |
Penginisialisasi yang ditetapkan.
Membuat objek GCKColor dengan nilai merah, hijau, biru, dan alfa yang ditentukan. Semua komponen warna berada dalam rentang [0.0, 1.0].
- (instancetype) initWithRed: |
|
(CGFloat) |
red |
green: |
|
(CGFloat) |
green |
blue: |
|
(CGFloat) |
blue |
|
|
| |
Membuat objek GCKColor dengan nilai merah, hijau, biru yang ditentukan dan nilai alfa 1,0 (opasitas penuh).
Semua komponen warna berada dalam rentang [0.0, 1.0].
- (instancetype) initWithUIColor: |
|
(UIColor *) |
color |
|
- (instancetype) initWithCGColor: |
|
(CGColorRef) |
color |
|
Membuat objek GCKColor dari CGColor dan nilai alfa tertentu.
- Sejak
- 4,0
- (instancetype) initWithCSSString: |
|
(NSString *) |
CSSString |
|
Membuat objek GCKColor dari representasi string CSS dalam bentuk "#RRGGBBAA" atau "#RRGGBB".
Menampilkan representasi string CSS untuk warna, dalam bentuk "#RRGGBBAA".
Intensitas warna merah; nilai dalam rentang [0.0, 1.0].
Intensitas warna hijau; nilai dalam rentang [0,0, 1,0].
Intensitas warna biru; nilai dalam rentang [0,0, 1,0].
Alfa (transparansi) warna; nilai dalam rentang [0.0, 1.0].
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2023-12-02 UTC.
[null,null,["Terakhir diperbarui pada 2023-12-02 UTC."],[[["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"]]