The Commodore 64 graphics chip (VIC-II) features 16 colors. These 16 colors can be used in all possible screenmodes, for chars, the screen (background or frame) or for sprites (multicolor, HiRes), etc.
The colors of the text can be changed directly with a key combination or with PRINT CHR$(value) alternative control characters. To change colors of sprites or HiRes-graphics in BASIC the command POKE memory address, color code must be used.
Commodore 64 color codes (hex, dec)
COLOR CODE (dec) | COLOR CODE (hex) | COLOR |
0 | $00 | black |
1 | $01 | white |
2 | $02 | red |
3 | $03 | cyan |
4 | $04 | purple |
5 | $05 | green |
6 | $06 | blue |
7 | $07 | yellow |
8 | $08 | orange |
9 | $09 | brown |
10 | $0A | pink |
11 | $0B | dark grey |
12 | $0C | grey |
13 | $0D | light green |
14 | $0E | light blue |
15 | $0F | light grey |
Commodore 64 color code to PETSCII code conversion
Color code (dec) | Color code (hex) | PETSCII code (dec) | PETSCII code (hex) | Color |
0 | $00 | 144 | $90 | black |
1 | $01 | 5 | $05 | white |
2 | $02 | 28 | $1C | red |
3 | $03 | 159 | $9F | cyan |
4 | $04 | 156 | $9C | purple |
5 | $05 | 30 | $1E | green |
6 | $06 | 31 | $1F | blue |
7 | $07 | 158 | $9E | yellow |
8 | $08 | 129 | $81 | orange |
9 | $09 | 149 | $95 | brown |
10 | $0A | 150 | $96 | pink |
11 | $0B | 151 | $97 | dark grey |
12 | $0C | 152 | $98 | grey |
13 | $0D | 153 | $99 | light green |
14 | $0E | 154 | $9A | light blue |
15 | $0F | 155 | $9B | light grey |
C64 Color codes with CHR($) and RGB values
Color | Name of color | Dec | Hex | key combination | In programs: PRINT CHR$(X) values of X: | Or PRINT “Control character” (in quotes!) | RGB Value | Web Colour |
Black | 0 | 0 | CTRL + 1 | 144 | small square left down | 0, 0, 0 | #000000 | |
White | 1 | 1 | CTRL + 2 | 5 | inverted E | 255, 255, 255 | #FFFFFF | |
Red | 2 | 2 | CTRL + 3 | 28 | inverted pound | 136, 0, 0 | #880000 | |
Cyan | 3 | 3 | CTRL + 4 | 159 | Triangle left down | 170, 255, 238 | #AAFFEE | |
Violet / purple | 4 | 4 | CTRL + 5 | 156 | inverted halfchess | 204, 68, 204 | #CC44CC | |
Green | 5 | 5 | CTRL + 6 | 30 | inverted arrow up | 0, 204, 85 | #00CC55 | |
Blue | 6 | 6 | CTRL + 7 | 31 | inverted arrow left | 0, 0, 170 | #0000AA | |
Yellow | 7 | 7 | CTRL + 8 | 158 | inverted π | 238, 238, 119 | #EEEE77 | |
Orange | 8 | 8 | C= + 1 | 129 | inverted spade | 221, 136, 85 | #DD8855 | |
Brown | 9 | 9 | C= + 2 | 149 | inverted 1/4-circle right down | 102, 68, 0 | #664400 | |
Light red | 10 | A | C= + 3 | 150 | inverted graphic-X | 255, 119, 119 | #FF7777 | |
Dark grey / grey 1 | 11 | B | C= + 4 | 151 | inverted annulus | 51, 51, 51 | #333333 | |
Grey 2 | 12 | C | C= + 5 | 152 | inverted club | 119, 119, 119 | #777777 | |
Light green | 13 | D | C= + 6 | 153 | inverted line right | 170, 255, 102 | #AAFF66 | |
Light blue | 14 | E | C= + 7 | 154 | inverted diamonds | 0, 136, 255 | #0088FF | |
Light grey / grey 3 | 15 | F | C= + 8 | 155 | inverted clubs | 187, 187, 187 | #BBBBBB |
Sources: