ansi_codes 0.1.1 copy "ansi_codes: ^0.1.1" to clipboard
ansi_codes: ^0.1.1 copied to clipboard

ANSI escape codes for styling strings in the terminal.

ansi_codes #

ANSI escape codes for styling strings in the terminal

You probably want the higher-level ansi for styling your strings.

Install #

dart pub add ansi_codes

Usage #

import 'package:ansi_codes/ansi_codes.dart';

void main() {
  print('${ansiCodes.green.open}Hello world!${ansiCodes.green.close}');
}

Codes #

Modifiers #

  • reset
  • bold
  • dim
  • italic (Not widely supported)
  • underline
  • overline Supported on VTE-based terminals, the GNOME terminal, mintty, and Git Bash.
  • inverse
  • hidden
  • strikethrough (Not widely supported)

Colors #

  • black
  • red
  • green
  • yellow
  • blue
  • magenta
  • cyan
  • white
  • blackBright (alias: gray, grey)
  • redBright
  • greenBright
  • yellowBright
  • blueBright
  • magentaBright
  • cyanBright
  • whiteBright

Background colors #

  • bgBlack
  • bgRed
  • bgGreen
  • bgYellow
  • bgBlue
  • bgMagenta
  • bgCyan
  • bgWhite
  • bgBlackBright (alias: bgGray, bgGrey)
  • bgRedBright
  • bgGreenBright
  • bgYellowBright
  • bgBlueBright
  • bgMagentaBright
  • bgCyanBright
  • bgWhiteBright
0
likes
120
pub points
23%
popularity

Publisher

unverified uploader

ANSI escape codes for styling strings in the terminal.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (LICENSE)

More

Packages that depend on ansi_codes