CRT::Ncurses::Formatter
Constants
Alignment tag names
Built-in attribute names (short and long forms)
Class methods
Parse a BBCode-style format string into a chtype array.
Syntax: [b] or [bold] — bold on [u] or [underline] — underline on [dim] — dim on [rev] or [reverse] — reverse on [so] or [standout] — standout on [bk] or [blink] — blink on [#FF] — foreground color (hex 00-FF) [##B0] — background color (hex 00-FF) [b #FF ##00] — combined attributes and colors [/] — pop last style [//] — reset all styles [stylename] — apply registered style [ — literal open bracket [C] or [center] — center alignment (at string start only) [R] or [right] — right alignment (at string start only) [L] or [left] — left alignment (at string start only)
Parse a single color token and return {fg, bg}. Used by parse_tokens internally and exposed for testing.
Color notation: #XX — foreground only ##XX — background only #XX/YY — foreground XX, background YY ##YY/XX — background YY, foreground XX
TODO: Support basic color words, e.g. #red, #red/blue, ##blue/red.