public class Color:
RGBA color used by Painter, Pen and Brush.
accent = Color(37, 99, 235, 1.0) print(accent.toCssColor())
| Modifier and Type | Member | Description |
|---|---|---|
| public property | alphaalpha as Double |
Alpha channel in `[0. |
| public property | blueblue as Int |
Blue channel in `[0, 255]`. |
| public property | greengreen as Int |
Green channel in `[0, 255]`. |
| public property | redred as Int |
Red channel in `[0, 255]`. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | Color | No summary. |
| Modifier and Type | Member | Description |
|---|---|---|
| public static | blackblack() as Color: |
Returns an opaque black color. |
| public | cloneclone() as Color: |
Creates a copy of the color. |
| public | darker | Returns a darker variant of this color. |
| public static | fromHex | Parses a `#RRGGBB` or `#RRGGBBAA` color literal. |
| public | lighter | Returns a lighter variant of this color. |
| public | mix | Mixes this color with another one. |
| public static | parse | Parses a CSS-like color value. |
| public | toCssColortoCssColor() as String: |
Serializes the color into a CSS-compatible `rgba(. |
| public override | toStringtoString() as String: |
No summary. |
| public static | transparenttransparent() as Color: |
Returns a fully transparent black color. |
| public static | whitewhite() as Color: |
Returns an opaque white color. |
| public | withAlpha | Returns the same RGB color with another alpha channel. |