API / geotoolkit / util / HsvColor / HsvColor
Specify HSV color, which can be defined as s set of the three color components (Hue, Saturation, Value).
Constructors
| [new HsvColor()](/solutions/geotoolkit/apis/classes/geotoolkit.util.hsvcolor.hsvcolor.md#new hsvcolor()) | [new HsvColor(hue, sat, val)](/solutions/geotoolkit/apis/classes/geotoolkit.util.hsvcolor.hsvcolor.md#new hsvcolor(hue, sat, val)) | [new HsvColor(rgba)](/solutions/geotoolkit/apis/classes/geotoolkit.util.hsvcolor.hsvcolor.md#new hsvcolor(rgba)) |
|---|
Methods
Constructors
• new HsvColor()
• new HsvColor(hue, sat, val)
| Name | Type | Description |
|---|---|---|
hue | number | hue from 0 to 360 |
sat | number | sat from 0 to 1 |
val | number | val from 0 to 1 |
• new HsvColor(rgba)
| Name | Type |
|---|---|
rgba | RgbaColor |
Methods
▸ adjustSaturation(delta): HsvColor
Add delta to saturation. Saturation is between 0 and 1
| Name | Type | Description |
|---|---|---|
delta | number | delta value to be added |
this
▸ adjustSaturationByFactor(factor): HsvColor
Multiply saturation factor. Saturation is between 0 and 1
| Name | Type | Description |
|---|---|---|
factor | number | saturation factor (between 0 - 1) |
this
▸ adjustValue(delta): HsvColor
Add delta to value. Value is between 0 and 1
| Name | Type | Description |
|---|---|---|
delta | number | delta value to be added |
this
▸ adjustValueByFactor(factor): HsvColor
Multiply value by factor. Value is between 0 and 1
| Name | Type | Description |
|---|---|---|
factor | number | factor to multiply this color by |
this
▸ clone(): HsvColor
Return clone of the color
clone
▸ getClassName(): string
string
▸ getHue(): number
Return hue
number
▸ getSaturation(): number
Return saturation
number
▸ getValue(): number
Return value
number
▸ toRgbaColor(): RgbaColor
Convert current value and saturation to RGBA
▸ toRgbaString(): string
Convert color from HSV to RGBA string
string
▸ Static getClassName(): string
string
▸ Static getNewColor(): string
return new color
string
▸ Static setBrightness(color, correctionFactor): RgbaColor
Sets brightness
| Name | Type | Description |
|---|---|---|
color | RgbaColor | color |
correctionFactor | number | correction Factor |
result