Color.fromListHSV
Jump to navigation
Jump to search
color.fromListHSV
converts a color in RGB list form — hue, saturation, value, and optional alpha, all in the range 0-255 — to a string in standard HSV color form.
See also: color.toListHSV
Arguments
Parameter Name | Type | Default Value | Meaning |
---|---|---|---|
hsvaList | list | null | list of the form [hue, saturation, value] or [hue, saturation, value, alpha]
|
Usage Notes
All methods and colors in the Mini Micro API, except this one, represent colors as hexadecimal strings, e.g. "#FF8080C8"
. However, sometimes it is convenient to represent a color as a list of numbers, so for example you can do math with them. Then, use color.fromListHSV
to convert this list back into standard HSV color form.
Example
print color.fromListHSV([255, 128, 20, 200])
The above prints #140A0AC8
.