Module Spectrum.Private

Internal modules exposed for testing purposes.

Warning: These modules are not part of the stable public API and may change without notice. They are exposed only for testing and should not be used in application code.

True color (24-bit RGB) serializer - preserves exact RGB values.

ANSI-256 color serializer - quantizes RGB to xterm256 palette.

ANSI-16 basic color serializer - quantizes to 16-color palette.

val make_printer : bool -> (Parser.token list -> string) -> (module Printer)

Create a printer with a specific serializer, bypassing environment detection. make_printer raise_errors to_code creates a printer that uses to_code for serialization. If raise_errors is true, invalid tags raise exceptions.