Color
From C64-Wiki
Jump to navigationJump to searchThe C64 has 16 different colors. These 16 colors can be used in all possible screen modes, 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.
Color | Name of color | for POKE |
Hex | Directly keycombination |
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 |
The C= is the Commodore-key
Memory Addresses for Colors[edit | edit source]
A little memory map overview for addresses, which can change colors using the BASIC-command POKE:
- 53280 Color of screenframe (value of colors 0-15, higher numbers result in repeating)
- 53281 Color of screenbackground (normal mode)
- 53282 Color of screenbackground 1 (used in multicolor & extended color mode)
- 53283 Color of screenbackground 2 (used in multicolor & extended color mode)
- 53284 Color of screenbackground 3 (extended color mode)
- 53285 Sprite multicolor 1 (only in multicolor mode)
- 53286 Sprite multicolor 2 (only in multicolor mode)
- 53287 Color of sprite 0
- 53288 Color of sprite 1
- 53289 Color of sprite 2
- 53290 Color of sprite 3
- 53291 Color of sprite 4
- 53292 Color of sprite 5
- 53293 Color of sprite 6
- 53294 Color of sprite 7
- 55296-56295 Color-RAM - With these memory addresses the individual color of all 1000 chars within the screen matrix (25 lines by 40 columns) can be controlled; for example:
POKE 55296,1
sets the first char at line 0 and column 0 with the color white.