[↑]
SmileBASIC4 Replica Reference
HSV
1. Calculate color code from HSV value

HSV(Hue,Saturation,Value[,Transparency])

Arguments

Hue

Color type (H): Positive value

・It is the same as the angle, and if it exceeds 360, it will be treated as the same color as 0.
・As the number increases, the color changes smoothly from red to yellow to green to blue to purple.

Saturation

Color vividness (S): 0 to 255

・The smaller the number, the whitish.

Value

Color brightness (V): 0 to 255

・0 indicates black and 255 indicates the brightest.

Transparency

Transparency to be set in the return color code: 0 to 255

・255 is the default.

Return Value

Color code equivalent to HSV value

Example

GCLS HSV(100,100,100,100)

FOR I=0 TO 360
GPSET I,10,HSV(I,255,255)
NEXT
2. Convert color code to HSV value

HSV ColorCode OUT Hue,Saturation,Value[,Transparency]

Argument

ColorCode

Color code to convert

・See GCOLOR for a description of color codes.

Return Value

Hue

The hue of the specified color

・Returns a value between 0 and 360.

Saturation

The saturation of the specified color

・Returns a value between 0 and 255.

Value

The brightness of the specified color

・Returns a value between 0 and 255.

Transparency

Transparency of the specified color

・Returns a value between 0 and 255.

Example

HSV RGB(192,128,0) OUT H,S,V
?H,S,V
About this site
Our site is an unofficial manual site of programming software "SmileBASIC" for NintendoSwitch™.
I acquire the content of the site from the official reference site of the SmileBoom Co.Ltd. that is the development and sales cause of the software in real time (a minimum period of 24 hours update) and display it. For automatic update, contents may become improper.
Please confirm the correct content in an official site.

June 3, 2020
by mim
OK
|