QColor
Hierarchy
-
↳ QColor
Index
Constructors
Properties
Methods
- alpha
- blue
- green
- red
- rgb
- rgba
- setAlpha
- setBlue
- setGreen
- setRed
- fromCmyk
- fromCmykF
- fromHsl
- fromHslF
- fromHsv
- fromHsvF
- fromQVariant
- fromRgb
- fromRgbF
Constructors
constructor
+ new QColor(): QColor
Overrides Component.constructor
Returns: QColor
+ new QColor(nativeElement
: NativeElement): QColor
Overrides Component.constructor
Parameters:
Name | Type |
---|---|
nativeElement | NativeElement |
Returns: QColor
+ new QColor(colorString
: string): QColor
Overrides Component.constructor
Parameters:
Name | Type |
---|---|
colorString | string |
Returns: QColor
+ new QColor(color
: GlobalColor): QColor
Overrides Component.constructor
Parameters:
Name | Type |
---|---|
color | GlobalColor |
Returns: QColor
+ new QColor(r?
: number, g?
: number, b?
: number, a?
: number): QColor
Overrides Component.constructor
Parameters:
Name | Type |
---|---|
r? | number |
g? | number |
b? | number |
a? | number |
Returns: QColor
Properties
native
• native: NativeElement | null
Inherited from Component.native
Methods
alpha
▸ alpha(): number
Returns: number
blue
▸ blue(): number
Returns: number
green
▸ green(): number
Returns: number
red
▸ red(): number
Returns: number
rgb
▸ rgb(): number
Returns the color as a number in ARGB32 format.
Returns: number
rgba
▸ rgba(): number
Returns the color as a number in ARGB32 format.
Returns: number
setAlpha
▸ setAlpha(value
: number): void
Parameters:
Name | Type |
---|---|
value | number |
Returns: void
setBlue
▸ setBlue(value
: number): void
Parameters:
Name | Type |
---|---|
value | number |
Returns: void
setGreen
▸ setGreen(value
: number): void
Parameters:
Name | Type |
---|---|
value | number |
Returns: void
setRed
▸ setRed(value
: number): void
Parameters:
Name | Type |
---|---|
value | number |
Returns: void
Static
fromCmyk
▸ fromCmyk(c
: number, m
: number, y
: number, k
: number, a
: number): QColor
Parameters:
Name | Type | Default |
---|---|---|
c | number | - |
m | number | - |
y | number | - |
k | number | - |
a | number | 255 |
Returns: QColor
Static
fromCmykF
▸ fromCmykF(c
: number, m
: number, y
: number, k
: number, a
: number): QColor
Parameters:
Name | Type | Default |
---|---|---|
c | number | - |
m | number | - |
y | number | - |
k | number | - |
a | number | 1 |
Returns: QColor
Static
fromHsl
▸ fromHsl(h
: number, s
: number, l
: number, a
: number): QColor
Parameters:
Name | Type | Default |
---|---|---|
h | number | - |
s | number | - |
l | number | - |
a | number | 255 |
Returns: QColor
Static
fromHslF
▸ fromHslF(h
: number, s
: number, l
: number, a
: number): QColor
Parameters:
Name | Type | Default |
---|---|---|
h | number | - |
s | number | - |
l | number | - |
a | number | 1 |
Returns: QColor
Static
fromHsv
▸ fromHsv(h
: number, s
: number, v
: number, a
: number): QColor
Parameters:
Name | Type | Default |
---|---|---|
h | number | - |
s | number | - |
v | number | - |
a | number | 255 |
Returns: QColor
Static
fromHsvF
▸ fromHsvF(h
: number, s
: number, v
: number, a
: number): QColor
Parameters:
Name | Type | Default |
---|---|---|
h | number | - |
s | number | - |
v | number | - |
a | number | 1 |
Returns: QColor
Static
fromQVariant
▸ fromQVariant(variant
: QVariant): QColor
Parameters:
Name | Type |
---|---|
variant | QVariant |
Returns: QColor
Static
fromRgb
▸ fromRgb(r
: number, g
: number, b
: number, a
: number): QColor
Parameters:
Name | Type | Default |
---|---|---|
r | number | - |
g | number | - |
b | number | - |
a | number | 255 |
Returns: QColor
Static
fromRgbF
▸ fromRgbF(r
: number, g
: number, b
: number, a
: number): QColor
Parameters:
Name | Type | Default |
---|---|---|
r | number | - |
g | number | - |
b | number | - |
a | number | 1 |
Returns: QColor