[img] Physical colours
MDFS::Info.Comp.BBC.Display.Colours.Physical Search

Physical colour numbers are used as the short physical colour in the VDU 19 command, and also used in the COLOUR and GCOL commands on platforms without a palette. The colour number is a bitmap of the colour to select. When implementing an operating system interface on other platforms this mapping must be adhered to. See also Physical colour numbers.

Colour bitmap

    7   6   5   4   3   2   1   0
  +---+---+---+---+---+---+---+---+
  | L | D | E | F | I | B | G | R |
  +---+---+---+---+---+---+---+---+
    |   |   |   |   |   |   |   |
    |   |   |   |   |   |   |   +---Red
    |   |   |   |   |   |   +-------Green            This gives:
    |   |   |   |   |   +-----------Blue              0 0 e f i b g r - &00+n - foreground colour
    |   |   |   |   +---------------Intense           0 1 e f i b g r - &40+n - extension
    |   |   |   +-------------------Flash             1 0 e f i b g r - &80+n - background colour
    |   |   +-----------------------Extension         1 1 e f i b g r - &C0+n - border colour
    |   +---------------------------Border
    +-------------------------------0=Foreground, 1=Background
  The BBC implements:
   l x x x f b g r - colour
   |       +-------- flash
   +---------------- layer
  The Amstrad CPC implements:
   l x x x f b g r - colour
   |       +-------- flash
   +---------------- layer
  The ZX Spectrum implements:
   l d e f i b g r - colour
   | | | | +-------- bright
   | | | +---------- flash
   | | +------------ only flash/bright
   | +-------------- border
   +---------------- layer
  The Commodore implements:
   l d x f i b g r - colour
     |     +-------- bright
     +-------------- border

  hardware limitations prevent
  seperate background colours
  DOS/Windows implements:
   l x x f i b g r - colour
   |     | +-------- bright
   |     +---------- flash
   +---------------- layer

  BBC BASIC for Windows has the closest
  to the fullest implementation.

  DOS BASIC has bright and flash, but
  the background is only bright when
  flashing.
  Windows BASIC has foreground and
  background bright, but no flashing.
 
 
  ANSI terminal implements:
   l b e f i b g r - colour
   | | | | +-------- bright
   | | | +---------- flash
   | | +------------ underline
   | +-------------- inverse
   +---------------- layer

  The Linux ANSI terminal has the
  fullest implemention, flash and
  bright, both independent.
  Brandy Basic implements:
   l b e f i b g r - colour
   |       +-------- bright
   +---------------- layer
 

Authored by J.G.Harston
Last update: 10-Dec-2018