SecondBASIC Documentation v3

Home / Function Reference / Rgb()

Rgb()

Description: Converts the <r>, <g>, <b> value into a color code for the VDP.

Syntax:

Rgb(<r>,<g>,<b>)

Part Description
<r> Required. The Red component of the RGB function.
<g> Required. The Green component of the RGB function.
<b> Required. The Blue component of the RGB function.

Notes: Each components range is from 0 to 7, where 7 is the highest intensity of the color channel and 0 is the dimmest. This makes a total of 512 colors, which is the maximum amount of colors without the use of advanced tricks.

Example:

        a = Rgb(7, 7, 7)
        Print a