{{htmlmetatags>metatag-robots=() metatag-title=(PEN | ugBASIC User Manual) metatag-keywords=(ugBASIC,Commodore 64,Commodore PLUS/4,ZX Spectrum) metatag-description=(Manual page for PEN) metatag-media-og:image=(:ugbasic:logo-ugbasic-fb.png) metatag-og:title=(PEN | ugBASIC User Manual) metatag-og:description=(Manual page for PEN) }} ====== ugBASIC User Manual ====== ===== PEN ===== ===== SYNTAX ===== PEN color ==== PURPOSE ==== The ''PEN'' command define the color that will be used to draw lines, shapes, or write text on the screen. In practice, it is like choosing the color of a pen or marker before you start drawing. Depending on the hardware capabilities of the computer, the range of colors available could be limited or very large. Some systems used predefined color palettes, while others allowed you to define your own colors. In order to be isomorphic, the ''color'' parameter repesents a value in the available color shades. For this 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. So the graphics capabilities of the ''PEN'' 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 pen color for the considered target, again if no color replacement has been done. ==== EXAMPLE ==== PEN 4 PEN esempio ==== ABBREVIATION ==== Pn ==== AVAILABLE ON ==== * * Atari (400/800) * Atari XL/XE * Commodore 128 (MOS 8502) * Commodore 128 (Zilog Z80) * Commodore 64 * Commodore 64+REU * TRS-80 Color Computer * TRS-80 Color Computer 3 * ColecoVision * Amstrad CPC 664 * Dragon 32 * Dragon 64 * Thomson MO5 * Thomson MO5 * Olivetti Prodest PC128 * Commodore PLUS/4 * SEGA SC-3000 * SEGA SG-1000 * * VG-5000 * Commodore VIC-20 * ZX Spectrum 48 ==== SEE ALSO ==== [[PAPER]] ==== ALIAS FOR ==== [[INK]] ==== ANY PROBLEM? ==== If you have encountered a problem using this command, if you think there is a bug or the explanation is unclear, please [[https://github.com/spotlessmind1975/ugbasic/issues/new?title=ISSUE ON PEN|open an issue]] for this keyword on GitHub. Thank you!===== POWERED BY ===== [[:ugbasic:user:index|{{ :ugbasic:user:logo-ugbasic.png?nolink&600 |}}]]