My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Featured
Downloads

acolor (Ada/ANSI color) is a simple Ada program that makes it easy to color and format output from shell script. It does this by converting combinations of readable arguments (bold, red, green, underline, etc.) into an ANSI escape sequence that your terminal emulator or console may understands.

It is Moshe Jacobson's color rewritten in Ada. I could not found his source any more, and this ansi-color (http://code.google.com/p/ansi-color/) is done in bash script, a little bit slow on usage.

You will need an Ada compiler to compile this program. eg. gnat in GCC.

Usage: acolor [ effect ] [ [lt]fgcolor ] [ bgcolor ]
              off        turns off any coloring and resets to default colors
              -l,--list  shows all the possible color combination visually
              -h,--help  list this help

  effect could be multiple of (some effects may not work for your terminal):
    bd bold nm normal ft faint it italic ul underline bl blink fb fastblink
    rv reversed iv invisible
  fg_color and bg_color are one of:
    black red green yellow blue magenta cyan white
  In addition, fg_color could also be one of:
    ltblack ltred ltgreen ltyellow ltblue ltmagenta ltcyan ltwhite

  It is compatible with Moshe Jacobson's color program. Soft link it color
  to avoid rewrite your script.
Example: In a POSIX compliant shell such as bash or ksh, you would do:
    echo "$(acolor ul yellow blue rv)Hi there.$(acolor off)"
  To enable underline, reversed for yellow color on blue background.
Powered by Google Project Hosting