API / geotoolkit / util / HlsColor / HlsColor
Specify HLS color, which can be defined as a set of the three color components (Hue, Luminosity and Saturation). It provides several functions to manipulate colors based on (HLS) as well as to convert colors to RgbaColor
Constructors
| [new HlsColor()](/solutions/geotoolkit/apis/classes/geotoolkit.util.hlscolor.hlscolor.md#new hlscolor()) | [new HlsColor(hue, luminosity, saturation)](/solutions/geotoolkit/apis/classes/geotoolkit.util.hlscolor.hlscolor.md#new hlscolor(hue, luminosity, saturation)) | [new HlsColor(rgba)](/solutions/geotoolkit/apis/classes/geotoolkit.util.hlscolor.hlscolor.md#new hlscolor(rgba)) |
|---|
Constructors
• new HlsColor()
• new HlsColor(hue, luminosity, saturation)
| Name | Type | Description |
|---|---|---|
hue | number | RGBA color between 0 - 360 |
luminosity | number | between 0 - 1 |
saturation | number | between 0 - 1 |
• new HlsColor(rgba)
| Name | Type |
|---|---|
rgba | RgbaColor |
Methods
▸ darker(percDarker): RgbaColor
Make the color darker
| Name | Type | Description |
|---|---|---|
percDarker | number | percentage to make the color darker |
▸ getClassName(): string
string
▸ getHue(): number
Return hue
number
▸ getLuminosity(): number
Return luminosity
number
▸ getSaturation(): number
Return saturation
number
▸ lighter(percLighter): RgbaColor
Make the color lighter
| Name | Type | Description |
|---|---|---|
percLighter | number | percentage to lighten the color |
▸ toRgbaColor(): RgbaColor
Convert color from HLS to RGBA
▸ toRgbaString(): string
Convert color from HLS to RGBA string
string
▸ Static getClassName(): string
string