[↑]
SmileBASIC4 Replica Reference
RGBF
1. Calculate color code from floating point RGB values

RGBF(R,G,B)
RGBF(A,R,G,B)

Arguments

A

Transparency: 0 to 1.0

・1.0 is the default.

R,G,B

Color elements: R, G, B each 0 to 1.0

Return Value

Color code calculated from the argument

2. Replace each component of the color code

RGBF(ColorCode,[A],[R],[G],[B])

Arguments

ColorCode

Replacement source color code

A,R,G,B

Replace color component

・Specify a value between 0 and 1.0.
・If each one is not specified, the corresponding component of the replacement source color code is used as it is.

Return Value

Color code calculated from the argument

Example

C1=RGBF(#C_RED, 0.5,,,) 'Translucent red
C2=RGBF(#C_BLUE,,1.0,,) 'Purple
3. Get RGB components from color code (floating point version)

RGBF ColorCode OUT R,G,B
RGBF ColorCode OUT A,R,G,B

Argument

ColorCode

Color code to get the color component

・See GCOLOR for a description of color codes.

Return Value

A

Variable that receives the transparency information of the specified color code

・Returns a value between 0 and 1.0

R,G,B

Variable that receives the color component information of the specified color code

・Returns values between 0 and 1.0 respectively.

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
|