Color

From C64-Wiki
(Redirected from color)
Jump to navigationJump to search
The 16 colors of the C64.

The 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
Black 0 0 CTRL  + 1  144 Zeichensatz1 208.png small square left down 0, 0, 0 #000000
White
White 1 1 CTRL  + 2  5 Zeichensatz1 133.png inverted E 255, 255, 255 #FFFFFF
Red
Red 2 2 CTRL  + 3  28 Zeichensatz1 156.png inverted pound 136, 0, 0 #880000
Cyan
Cyan 3 3 CTRL  + 4  159 Zeichensatz1 223.png Triangle left down 170, 255, 238 #AAFFEE
Violet
Violet / purple 4 4 CTRL  + 5  156 Zeichensatz1 220.png inverted halfchess 204, 68, 204 #CC44CC
Green
Green 5 5 CTRL  + 6  30 Zeichensatz1 158.png inverted arrow up 0, 204, 85 #00CC55
Blue
Blue 6 6 CTRL  + 7  31 Zeichensatz1 159.png inverted arrow left 0, 0, 170 #0000AA
Yellow
Yellow 7 7 CTRL  + 8  158 Zeichensatz1 222.png inverted π 238, 238, 119 #EEEE77
Orange
Orange 8 8 C=  + 1  129 Zeichensatz1 193.png inverted spade 221, 136, 85 #DD8855
Brown
Brown 9 9 C=  + 2  149 Zeichensatz1 213.png inverted 1/4-circle right down 102, 68, 0 #664400
Lightred
Light red 10 A C=  + 3  150 Zeichensatz1 214.png inverted graphic-X 255, 119, 119 #FF7777
Darkgrey
Dark grey / grey 1 11 B C=  + 4  151 Zeichensatz1 215.png inverted annulus 51, 51, 51 #333333
Grey
Grey 2 12 C C=  + 5  152 Zeichensatz1 216.png inverted club 119, 119, 119 #777777
Lightgreen
Light green 13 D C=  + 6  153 Zeichensatz1 217.png inverted line right 170, 255, 102 #AAFF66
Lightblue
Light blue 14 E C=  + 7  154 Zeichensatz1 218.png inverted diamonds 0, 136, 255 #0088FF
Lightgrey
Light grey / grey 3 15 F C=  + 8  155 Zeichensatz1 219.png 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:

  • 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 (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.