Default color palette

The default MEGA65 color palette consists of the 16 colors of the Commodore 64 palette followed by 16 rainbow-themed colors.

This demo program by retroCombs prints the colors and their names on a MEGA65:

Using colours from BASIC 65

To change which palette entry is used for printing, use the COLOR command:

COLOR 3

To change which palette entry is used for bitmap graphics, use the PEN command:

PEN 3

In the MEGA65’s regular color mode, the color in each palette entry can be changed to any of 4,096 colors, with 16 possible settings for red, green, and blue. To change the color for a palette entry:

PALETTE COLOR 3, 10, 15, 14

To restore the default colors:

PALETTE RESTORE

Table of Colour RGB Values

The following table lists the color index, MEGA65 RGB values, and the approximate web hex code for each color. The RGB values are the arguments for the PALETTE command to reproduce the color on the MEGA65.

The hex codes for the C64 colors (from the C64 Wiki) represent how a C64 (or the MEGA64 in C64 mode) reproduces the colors. These do not match the MEGA65 RGB values in all cases. When reproducing the colors on a web page or in a modern graphics program, you may prefer the RGB values over the hex code to reproduce the MEGA65 display instead of the C64.

Index

Red

Green

Blue

Web Hex

Color name

Index

Red

Green

Blue

Web Hex

Color name

0

0

0

0

#000000

Black

1

15

15

15

#FFFFFF

White

2

15

0

0

#880000

Red

3

0

15

15

#AAFFEE

Cyan

4

15

0

15

#CC44CC

Purple

5

0

15

0

#00CC55

Green

6

0

0

15

#0000AA

Blue

7

15

15

0

#EEEE77

Yellow

8

15

6

0

#DD8855

Orange

9

10

4

0

#664400

Brown

10

15

7

7

#FF7777

Light Red (Pink)

11

5

5

5

#333333

Dark Grey

12

8

8

8

#777777

Grey

13

9

15

9

#AAFF66

Light Green

14

9

9

15

#0088FF

Light Blue

15

11

11

11

#BBBBBB

Light Grey

16

14

0

0

#EE0000

Guru Meditation

17

15

5

0

#FF5500

Rambutan

18

15

11

0

#FFBB00

Carrot

19

14

14

0

#EEEE00

Lemon Tart

20

7

15

0

#77FF00

Pandan

21

6

14

6

#66EE66

Seasick

22

0

14

3

#00EE33

Soylent Green

23

0

15

9

#00FF99

Slimer Green

24

0

13

13

#00DDDD

The Other Cyan

25

0

9

15

#0099FF

Sea Sky

26

0

3

15

#0033FF

Smurf Blue

27

0

0

14

#0000EE

Screen of Death

28

7

0

15

#7700FF

Plum Sauce

29

12

0

15

#CC00FF

Sour Grape

30

15

0

11

#FF00BB

Bubblegum

31

15

3

6

#FF3366

Hot Tamales

 

PETSCII Codes for selecting colours

In the Appendix, in a section called “PETSCII Codes and CHR$”, there is a table listing all the PETSCII codes. Some of these relate to selecting colours. For convenience, here’s a filtered table containing only the PETSCII codes relating to selecting colours:

Action

Hex

Decimal

Action

Hex

Decimal

Switch to alternate palette

\x01

1

Switch to default palette

\x04

4

default colour

alternate colour

 

 

black

guru meditation

\x90

144

white

rambutan

\x05

5

red

carrot

\x1c

28

cyan

lemon tart

\x9f

159

purple

pandan

\x9c

156

green

seasick green

\x1e

30

blue

soylent green

\x1f

31

yellow

slimer green

\x9e

158

orange

the other cyan

\x81

129

brown

sea sky

\x95

149

lt red (pink)

smurf blue

\x96

150

dk gray

screen of death

\x97

151

md gray

plum sauce

\x98

152

lt green

sour grape

\x99

153

lt blue

bubblegum

\x9a

154

lt gray

hot tamales

\x9b

155