Skip to content

BASIC GETPALETTE Function

Curtis F Kaylor edited this page Oct 11, 2023 · 1 revision

GETPALETTE$

TYPE: plusBASIC graphics function


FORMAT: GETPALETTE$ ( palette )

Action: Returns the RGB values in the specified palette.

  • palette is a pallete number in the range 0 through 3.
  • Returns a 32 character binary string containing 16 RGB values.

Example:

C$ = GETPALETTE$(P)
H$ = HEX$(C$)
J = 4*I
PRINT MID$(H$,J+4,1);MID$(H$,J+1,2)

Prints the hexadecimal RGB value of index I of color palette P.

Clone this wiki locally