Documentation
¶
Overview ¶
Package vga provides shared helpers for rendering 16-color CP437 character/attribute grids and 6-bit VGA palettes into styled HTML fragments.
Index ¶
Constants ¶
const ( // PaletteColors is the number of colors in a 4-bit CGA/VGA text palette. PaletteColors = 16 // PaletteBytes is the byte length of an RGB 6-bit VGA DAC palette (16 × 3). PaletteBytes = 48 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct {
ICEColor bool // Treat attribute bit 7 as bright background (16 backgrounds) instead of blink.
Chars512 bool // Treat attribute bit 3 as glyph bank selector (limits foreground to 8 colors).
SkipTrim bool // Preserve trailing blank rows when false, trailing blank rows are trimmed.
}
Options controls attribute decoding during HTML rendering.
type Palette ¶
type Palette [PaletteColors]string
Palette holds 16 CSS #rrggbb color strings.
func ParsePalette ¶
ParsePalette parses a 48-byte 6-bit VGA DAC palette (values 0..63) into CSS #rrggbb strings.