FANDOM


Logo takes advantage of the computer's ability to display graphics and text in various colors. Use of color can give your Logo programs pizzazz and dramatically enhance Logo graphics with little or no additional complication to the Logo procedures that draw them. Contextual text colors help you structure your procedures and immediately identfy typing mistakes.

Text Colors

The Listener Window and edit windows automatically display Logo text in colors according to the types of words you type. Logo provides a different color for each type of Logo element, including primitives, procedures, names, numbers and delimiters. This helps you organize your Logo commands and immediately identify typing mistakes. The colors for the different elements can be set and changes in the Text Colors... dialog in the Options menu.

Colors displayed in the Listener Window can also be controlled by the TEXTBG, TEXTFG, and SETATTR commands. These commands control the color of the text Logo uses for printing and the color of the background on which it appears.

Graphics Colors

Logo graphics can utilize up to 256 different colors depending on the video card in your computer. The SETPC command controls the color of the pen with which the turtle draws. The color of the turtle itself reflects its current pen color.

To select a pen color, you may also click the SETPC button on the button bar or select the Turtle/Pen Color... menu command.

The SETBG command determines the background color of the Graphics Window in which the turtle draws.

To select a background color, you can also click the SETBG button on the button bar or select the menu command Turtle/Background color...

Palettes

The colors that the turtle(s) can use to draw are organized into four sets called palettes. These palettes are similar to an artist's palette in that each has a set of 256 different colors representing the available pen and background colors when the palette is active. (If you use Windows in 16-color mode the 256 colors are 16 repetitions of the 16 available colors.) Use the SETPALLET command to change from one palette to another. The four palettes are numbered from 0 to 3.

When you switch from one palette to another, all of the colors displayed on the screen also switch. For example, a line drawn in color 1 of palette 0 switches to color 1 of palette 1 when you switch from palette 0 to palette 1.

Windows is capable of displaying as many colors as the graphics card can support. If Windows is running in 256-color mode, Logo uses a 256-color palette as the default palette for the display device. On a 16-color display, the Logo color palette holds the 16 available colors.

Designing Colors and Palettes

You can design individual colors in a palette by specifying the amount of red, green, and blue tint in each by using the SETCOLOR command.

Combining the ability to switch palettes with the ability to design colors can produce spectacular effects. For example, you can design a colorful graphics with colors from palette 0. Switch to palette 1 and make each color black (SETCOLOR n [0 0 0]). As you change each color number, each region of the screen drawn in that color disappears. When all colors have been changed, the screen is blank. Switch black to palette 0 and watch the graphics dramatically reappear.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.