Run Your Own Bulletin Board System

Another fine product © 2019 by Modern Pascal Solutions, LLC.

User Tools

Site Tools


Sidebar

color_codes

Color Codes

In the early years of BBSing, everything was black and white. Eventually, around 1983, authors started embedding ANSI Color sequences in to their text, making for a much more beautiful experience. Of course, asking Sysops to memorize ANSI color sequences was not the way to go, instead the authors started implementing techniques to ease how to implement colors.

Prefix Color Range(s)
| Pipe codes are the | (pipe) key followed by two hex numbers.
The first is the background and the second being the foreground.
e.g. |1F is Blue Background, White Text.
@X PCBoard code is @X followed by two hex numbers.
The first is the background and the second being the foreground.
e.g. @X1F is Blue Background, White Text.
# Similar to HTML, we use # and six hex numbers.
Grouped in pairs, they are rrggbb (rr=Red), (gg=Green), (bb=Blue).
e.g. #FFFFFF is White Text
This uses actually translates to the “t” ANSI Sequence for color change.
$ Similar to the previous we use $ and six hex numbers.
Grouped in pairs, they are rrggbb (rr=Red), (gg=Green), (bb=Blue).
e.g. $FFFFFF is White Text
This uses actually translates to the “m” ANSI Sequence for color change.
% Similar to HTML, we use % and six hex numbers.
Grouped in pairs, they are rrggbb (rr=Red), (gg=Green), (bb=Blue).
e.g. %000080 is Blue Background
This uses actually translates to the “t” ANSI Sequence for color change.
! Similar to the previous we use ! and six hex numbers.
Grouped in pairs, they are rrggbb (rr=Red), (gg=Green), (bb=Blue).
e.g. $FFFFFF is White Text
This uses actually translates to the “m” ANSI Sequence for color change.

PIPE and PCB COLORS

<pipe or @X><bg hex><fg hex> Hex Colors:

  • 0 = Black
  • 1 = Blue
  • 2 = Green
  • 3 = Teal
  • 4 = Red
  • 5 = Purple
  • 6 = Brown
  • 7 = Silver
  • 8 = Bright Black
  • 9 = Bright Blue
  • A = Bright Green
  • B = Bright Teal
  • C = Bright Red
  • D = Bright Purple
  • E = Yellow
  • F = White

Putting to use

We found during our testing of other terminals (looking to see who all supports 24-bit color) that you can stack your commands. So, if we want to show an off yellow, what we do is stack the '|0E#FFFFF0My Text'. Terminals that only support 16 color will change to Yellow on Black, while terminals that support 24-bit change to Yellow on Black, then Off Yellow (24bit color). By following this practice, you can use the 16 colors as your fall-back on terminals that do not support modern ANSI.

NOTE Sometimes the inability to support more than 16 colors is limited by the platform or hardware. Microsoft operating systems by default only support 16 colors.

color_codes.txt · Last modified: 01/02/2020 22:47 by Ozz Nixon