Color

From C64-Wiki
Jump to: navigation, search

The C64 has 16 different 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 direct with a keycombination or with PRINT CHR$(Wert) alternative control characters. To change colors of sprites or HiRes-graphics in BASIC the command POKE memoryadress, colorcode must be used.

Color Name of color
for POKE
Directly
keycombination
In programs:
PRINT CHR$(X)
values of X:
Or PRINT "Control character"
(in quotes!)
RGB Value Web Colour
Black
Black 0 CTRL  + 1  144 small square left down 0, 0, 0 #000000
White
White 1 CTRL  + 2  5 inverted E E 255, 255, 255 #FFFFFF
Red
Red 2 CTRL  + 3  28 inverted pound 136, 0, 0 #880000
Cyan
Cyan 3 CTRL  + 4  159 Triangle left down 170, 255, 238 #AAFFEE
Violet
Violet / purple 4 CTRL  + 5  156 inverted halfchess 204, 68, 204 #CC44CC
Green
Green 5 CTRL  + 6  30 inverted arrow up 0, 204, 85 #00CC55
Blue
Blue 6 CTRL  + 7  31 inverted arrow left 0, 0, 170 #0000AA
Yellow
Yellow 7 CTRL  + 8  158 inverted π 238, 238, 119 #EEEE77
Orange
Orange 8 C=  + 1  129 inverted heart 221, 136, 85 #DD8855
Brown
Brown 9 C=  + 2  149 inverted 1/4-circle right down 102, 68, 0 #664400
Lightred
Light red 10 C=  + 3  150 inverted graphic-X 255, 119, 119 #FF7777
Darkgrey
Dark grey / grey 1 11 C=  + 4  151 inverted annulus 51, 51, 51 #333333
Grey
Grey 2 12 C=  + 5  152 inverted spade 119, 119, 119 #777777
Lightgreen
Light green 13 C=  + 6  153 inverted line right 170, 255, 102 #AAFF66
Lightblue
Light blue 14 C=  + 7  154 inverses diamonds 0, 136, 255 #0088FF
Lightgrey
Light grey / grey 3 15 C=  + 8  155 inverted clubs 187, 187, 187 #BBBBBB

The C=  is the Commodore-key

Memory Addresses for Colors[edit]

A little memory map overview for addresses, which can change colors using the BASIC-command POKE:

  • 646 Textcolor
  • 647 Color under position of cursor
  • 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 (used in multicolor & 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.