ansipen library

Drop-in replacement for the ansicolor package's AnsiPen API.

Provides the same fluent pen-style interface plus additional styles (bold, italic, strikethrough, etc.), 16M true color RGB, and correct nested color handling.

import 'package:quectocolors/ansipen.dart';

final pen = AnsiPen()..red();
print(pen('Hello'));

Classes

AnsiPen
A fluent pen-style API for building ANSI-styled strings.

Enums

AnsiColorLevel
Terminal color capability levels, ordered from least to most capable.

Constants

ansi_default → const String
Deprecated: use ansiDefault instead.
ansi_esc → const String
Deprecated: use ansiEscape instead.
ansiDefault → const String
Reset all colors and options for current SGRs to terminal defaults.
ansiEscape → const String
ANSI Control Sequence Introducer, signals the terminal for new settings.
ansiResetBackground → const String
Ansi codes that default the terminal's background color without altering the foreground, when printed.
ansiResetForeground → const String
Ansi codes that default the terminal's foreground color without altering the background, when printed.

Properties

ansiColorDisabled bool
Globally enable or disable AnsiPen settings.
getter/setter pair
ansiColorLevel AnsiColorLevel
The detected (or overridden) ANSI color capability level.
getter/setter pair
color_disabled bool
Deprecated: use ansiColorDisabled instead.
getter/setter pair

Functions

resetBackground() String
Deprecated: use the ansiResetBackground constant instead.
resetForeground() String
Deprecated: use the ansiResetForeground constant instead.