SolidColorDisplay

From MiniScript Wiki
Revision as of 03:49, 14 January 2024 by JoeStrout (talk | contribs) (added an example)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The SolidColorDisplay class in Mini Micro is a display type that represents a single color over the entire screen. It is often used to control overall background color of the screen, or as an overlay to fade the rest of the displays in or out.

Note that "solid" here refers to the entire display layer being one color. It does not imply that this color must be opaque; translucent colors work perfectly well.

By default, display 7 is configured as a solid black display (by the clear command).

Methods and Properties

Method or Property Purpose
SolidColorDisplay.color get or set the color of the display layer

Example

The following example sets the background (display 7) to blue, and also clears the pixel display (layer 5) to clear so that the background can be seen.

clear
display(7).color = color.blue
display(5).clear color.clear