The PAPER
command define the background color of the screen. Imagine having a blank sheet of
paper to draw on: with PAPER
, you can choose the color of this sheet, turning it into a colored
sheet, lined or squared, depending on your preferences and the capabilities of your computer.
The parameter color
is represented by a value in the available colors, from 0 to maximum
(PAPER COLORS
). For the very specific reasons, each color is encoded by a literal constant,
like WHITE
or YELLOW
. Those constants will be replaced by proper color index or
values, depending on the hardware. Obviously, you can directly put the numeric value
for the color, but you have to know the underlying encoding of the colors.
By combining the background color (defined with PAPER
) with the color of the text or lines
(defined with PEN
), you can create interesting visual effects and improve the readability
of your programs. You can also use PAPER
to create colored backgrounds that simulate
different environments, such as a starry sky, a green meadow or a blue ocean. In simple games,
PAPER
allows you to define the game background, creating a more immersive atmosphere.
So the graphics capabilities of the PAPER
command are closely tied to the capabilities of
the target running the program. The resolution of the screen affected the quality of the colors displayed.
On lower-resolution screens, colors could appear less sharp. Some systems offers a wider color
gamut and more flexibility in defining colors. Others use a limited color palette could result
in some uniformity in the colors available. In some target you can define your own palettes,
so there is no guarantee that the constants and values are the same.
You can use the DEFAULT
constant to use the default paper color for
the considered target, again if no color replacement has been done.
PAPER color
PAPER GREEN PAPER colore
Join BASIC 10Liner Contest with ugBASIC!
An interesting competition is held at the beginning of each year: the
BASIC 10Liner Contest.
It is possible to use ugBASIC to participate in the next
"BASIC10Liner" competition, in the following categories:
PAPER (instruction) ↔ Pa
If you have found a problem with this keyword, if you think there is a bug or, more
simply, you would like it to be improved, open an issue for this example on GitHub.
Thank you!
open an issue
BACK TO KEYWORDS