You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
##Description
The color procedure is used to change the currently active color. This is the color of characters that are to be put on the screen. The alternate spelling is colour.
##Example
This program prints out the message "Bravo" three times, each in a different color.
setscreen ("graphics")
for i : 1 .. 3
color (i)
put "Bravo"
end for
##Example
This program prints out a message. The color of each letter is different from the preceding letter. For letter number i the color number is i mod maxcolor + 1. This cycles repeatedly through all the available colors.
setscreen ("graphics")
const message := "Happy New Year!!"
for i : 1 .. length (message)
color (i mod maxcolor + 1)
put message (i) ..
end for
##Details
See maxcolor for the number of colors available in the various "graphics" modes. The background color that text appears upon can be set using the colorback procedure.
The screen must be in a "graphics" mode to use the color procedure. See setscreen for details.