[↑]
SmileBASIC4 Replica Reference
HSVF
1. Calculate color code from HSV value (floating point version)

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

Arguments

Hue

Color type (H): Positive value

・Specify the color type from 0 to 1.
・As the number increases, the color changes smoothly from red to yellow to green to blue to purple.
・When it exceeds 1, it returns to the same color as 0.

Saturation

Color vividness (S): 0 to 1

・The smaller the number, the whitish.

Value

Color brightness (V): 0 to 1

・0 is black and 1 is the brightest.

Transparency

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

・1 is the default.

Return Value

Color code equivalent to HSV value

Example

GCLS HSVF(0.4,0.4,0.4,0.4)

FOR I=0 TO 360
GPSET I,10,HSVF(I/360,1,1)
NEXT
2. Convert color code to HSV value (floating point version)

HSVF 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 1.0.

Saturation

The saturation of the specified color

・Returns a value between 0 and 1.0.

Value

The brightness of the specified color

・Returns a value between 0 and 1.0.

Transparency

Transparency of specified color

・Returns a value between 0 and 1.0.

Example

HSVF 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
|