INK

BASin

INK

Statement/Command

INK specifies the foreground colour in which the characters are displayed, points plotted and lines and curves drawn.

How to use INK

INK May be used as a direct command but is normally used to form a statement in a program. It is followed by a numeric value, for example

70 INK x

The value following INK is rounded to the nearest integer and may range from 0 to 9. The following foreground colours are then given.

0 Black
1 Blue
2 Red
3 Magenta (Purple)
4 Green
5 Cyan (Blue-Green)
6 Yellow
7 White
8 Transparent
9 Contrasting Black or White

INK 8 specifies that the existing colour remains unchanged at any position on the screen where INK 8 is used. INK 9 causes the ink colours to be either black or white so that it shows up against the paper (background) colour.

Global and local ink colours

When INK forms a statement alone, as above, the colour is global and all subsequent displays occur in this foreground colour. INK may also be embeeded in display statements formed by PRINT, INPUT, PLOT, DRAW and CIRCLE. INK follows the keyword but precedes the data or display parameters; it is followed by the same values and a semicolon, for example

60 CIRCLE INK 4;128,88,87

The effect of INK is then local and applies only to the characters displayed, point plotted or line drawn by the display statement, this example drawing a green circle. Thereafter the ink colour reverts to the global colour or default colour of black.

Format

  • INK int-num-expr [;]

See also

Chapter 16.