Welcome, Guest. Please login or register.

Author Topic: color AmigaShell out there?  (Read 3194 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline nyteschayde

  • VIP / Donor - Lifetime Member
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 643
    • Show all replies
    • http://www.nyteshade.com
Re: color AmigaShell out there?
« on: May 10, 2013, 07:34:49 PM »
The Amiga CLI and Shell support the standard ANSI escape sequences for enabling color. They are limited to the available colors and those colors are taken from the palette as mentioned above.

You can set foreground colors with:

echo "*E[3Xm"

where X is a number from 0 to 7

and background colors with:

echo "*E[4Xm"

where X is a number from 0 to 7

You can also do both on the same line using something like

echo "*E[4X;3Xm"

If you need to reset the styles use

echo "*E[0m"

You can also do other things like bold "*E[1m" and I think the Amiga also supports underline and italics. Those are values in the 2-6 range but I can't remember which one is which.

If you are doing a lot of shell manipulation there are some cool values you can do with these escape sequences. *E[ is the same thing as CSi if you look up these ANSI escape sequences elsewhere.
Senior MTS Software Engineer with PayPal
Amigas: A1200T 060/603e PPC • A1200T 060 • A4000D 040 • A3000 (x2) • A2000 Vamp/V2 • A1200 (x4) • A1000 (x3) • A600 Vamp/V1 • A500
 

Offline nyteschayde

  • VIP / Donor - Lifetime Member
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 643
    • Show all replies
    • http://www.nyteshade.com
Re: color AmigaShell out there?
« Reply #1 on: May 11, 2013, 06:59:27 AM »
Here is a screen shot showing 30-37 and 90-97. 90-97 are supposed to bright versions of 30-37. This is running in VINCEd.

Senior MTS Software Engineer with PayPal
Amigas: A1200T 060/603e PPC • A1200T 060 • A4000D 040 • A3000 (x2) • A2000 Vamp/V2 • A1200 (x4) • A1000 (x3) • A600 Vamp/V1 • A500