COLOR
BASIC keyword | |
Keyword: | COLOR |
Abbreviation: | CO Shift+L |
Type: | Command |
Token code: | UNK |
Handling routine in BASIC ROM: |
UNK |
List of all BASIC keywords |
Remark: This article describes the BASIC command COLOR in Commodore BASIC V3.5.
Type: Command General Programming-Syntax: COLOR <color source#>, <color #> ,[<luminance #>
COLOR is a BASIC 3.5 command that is used to change the color of the display.
Number | Source |
0 | background |
1 | foreground |
2 | multicolor 1 |
3 | multicolor 2 |
4 | border |
Colors you can use are in the range 1-16 (Black, White...). As an option, you can include the luminance level 0-7, with 0 being lowest and 7 being highest. Luminance defaults to 7. Luminance lets you select from 8 levels of brightness for any color except black.
This results in a palette of 121 different color tones, given the fact that black always remains the same in all eight brightness levels.
The following colors can be assigned using the Color value parameter:
Color (Stufe 7) |
Color (Stufe 4) |
Color (Stufe 0) |
Name | Value |
---|---|---|---|---|
Black | 1 | |||
White | 2 | |||
Red | 3 | |||
Cyan | 4 | |||
Purple | 5 | |||
Green | 6 | |||
Blue | 7 | |||
Yellow | 8 | |||
Orange | 9 | |||
Brown | 10 | |||
YellowGreen | 11 | |||
Rosa | 12 | |||
BlueGreen | 13 | |||
Light Blue | 14 | |||
Zyklam | 15 | |||
Light Green | 16 |
Parameter values outside the ranges described above are acknowledged with the error message ?ILLEGAL QUANTITY ERROR. If not two or three parameters are present, the error message ?SYNTAX ERROR will appear.
Examples[edit | edit source]
Sets the border to black:
COLOR 4,1
Sets the background to white:
COLOR 0,2
Sets the foreground to blue-green, with half intensity:
COLOR 1,13,4
ABS | ASC | ATN | AUTO | BACKUP | BOX | CHAR | CHR$ | CIRCLE | CLOSE | CLR | CMD | COLLECT | COLOR | CONT | COPY | COS | DATA | DEC | DEF | DELETE | DIM | DIRECTORY | DLOAD | DO | DRAW | DS | DS$ | DSAVE | END | EL | ELSE | ER | ERR$ | EXIT | EXP | FN | FOR | FRE | GET | GET# | GETKEY | GOSUB | GOTO | GRAPHIC | GSHAPE | HEADER | HELP | HEX$ | IF | INPUT | INPUT# | INSTR | INT | JOY | KEY | LEFT$ | LEN | LET | LIST | LOAD | LOCATE | LOG | LOOP | MID$ | MONITOR | NEW | NEXT | ON | OPEN | PAINT | PEEK | POKE | POS | PRINT | PRINT USING | PRINT# | PUDEF | RCLR | RDOT | READ | REM | RENAME | RENUMBER | RESTORE | RESUME | RETURN | RGR | RIGHT$ | RLUM | RND | RUN | SAVE | SCALE | SCNCLR | SCRATCH | SGN | SIN | SOUND | SPC | SQR | SSHAPE | STOP | STR$ | SYS | TAB | TAN | TRAP | TROFF | TRON | UNTIL | USR | VAL | VERIFY | VOL | WHILE | WAIT