/ fm / liveswitch / Color
Class: Color
fm.liveswitch.Color
A color.
Table of contents
Constructors
Methods
- fmliveswitchColorInit
- getB
- getG
- getR
- getTypeString
- fromHsb
- getBlack
- getBlue
- getCyan
- getDarkBlue
- getDarkGreen
- getDarkRed
- getGray
- getGreen
- getMagenta
- getOlive
- getPurple
- getRed
- getTeal
- getWhite
- getYellow
Constructors
constructor
+ new Color(r
: number, g
: number, b
: number): Color
Initializes a new instance of the [[fm.liveswitch.color]] class.
Parameters:
Name | Type | Description |
---|---|---|
r |
number | The red value (0-255). |
g |
number | The green value (0-255). |
b |
number | The blue value (0-255). |
Returns: Color
Defined in: Generated/TypeScript/fm.liveswitch/Color.ts:24
Methods
fmliveswitchColorInit
▸ Private
fmliveswitchColorInit(): void
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/Color.ts:19
getB
▸ getB(): number
Gets the blue value (0-255).
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/Color.ts:277
getG
▸ getG(): number
Gets the green value (0-255).
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/Color.ts:289
getR
▸ getR(): number
Gets the red value (0-255).
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/Color.ts:301
getTypeString
▸ getTypeString(): string
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Color.ts:9
fromHsb
▸ Static
fromHsb(hue
: number, saturation
: number, brightness
: number): Color
Creates a [[fm.liveswitch.color]] using hue, saturation, and brightness.
Parameters:
Name | Type | Description |
---|---|---|
hue |
number | The hue value (0-359). |
saturation |
number | The saturation value (0.0-1.0). |
brightness |
number | The brightness value (0.0-1.0). |
Returns: Color
Defined in: Generated/TypeScript/fm.liveswitch/Color.ts:59
getBlack
▸ Static
getBlack(): Color
Gets a black color.
Returns: Color
Defined in: Generated/TypeScript/fm.liveswitch/Color.ts:97
getBlue
▸ Static
getBlue(): Color
Gets a blue color.
Returns: Color
Defined in: Generated/TypeScript/fm.liveswitch/Color.ts:109
getCyan
▸ Static
getCyan(): Color
Gets a cyan color.
Returns: Color
Defined in: Generated/TypeScript/fm.liveswitch/Color.ts:121
getDarkBlue
▸ Static
getDarkBlue(): Color
Gets a dark-blue color.
Returns: Color
Defined in: Generated/TypeScript/fm.liveswitch/Color.ts:133
getDarkGreen
▸ Static
getDarkGreen(): Color
Gets a dark-green color.
Returns: Color
Defined in: Generated/TypeScript/fm.liveswitch/Color.ts:145
getDarkRed
▸ Static
getDarkRed(): Color
Gets a dark-red color.
Returns: Color
Defined in: Generated/TypeScript/fm.liveswitch/Color.ts:157
getGray
▸ Static
getGray(): Color
Gets a gray color.
Returns: Color
Defined in: Generated/TypeScript/fm.liveswitch/Color.ts:169
getGreen
▸ Static
getGreen(): Color
Gets a green color.
Returns: Color
Defined in: Generated/TypeScript/fm.liveswitch/Color.ts:181
getMagenta
▸ Static
getMagenta(): Color
Gets a magenta color.
Returns: Color
Defined in: Generated/TypeScript/fm.liveswitch/Color.ts:193
getOlive
▸ Static
getOlive(): Color
Gets an olive color.
Returns: Color
Defined in: Generated/TypeScript/fm.liveswitch/Color.ts:205
getPurple
▸ Static
getPurple(): Color
Gets a purple color.
Returns: Color
Defined in: Generated/TypeScript/fm.liveswitch/Color.ts:217
getRed
▸ Static
getRed(): Color
Gets a red color.
Returns: Color
Defined in: Generated/TypeScript/fm.liveswitch/Color.ts:229
getTeal
▸ Static
getTeal(): Color
Gets a teal color.
Returns: Color
Defined in: Generated/TypeScript/fm.liveswitch/Color.ts:241
getWhite
▸ Static
getWhite(): Color
Gets a white color.
Returns: Color
Defined in: Generated/TypeScript/fm.liveswitch/Color.ts:253
getYellow
▸ Static
getYellow(): Color
Gets a yellow color.
Returns: Color
Defined in: Generated/TypeScript/fm.liveswitch/Color.ts:265