This format is used with Wimp_SetColour
and
Wimp_TextColour
. The lower 4 bits are used as a
palette index. By default, the palette is configured as shown
below. Bits 4..6 specify the plotting action (e.g. 'OR',
'XOR' or overwrite) for Wimp_SetColour
. Bit 7
controls whether Wimp_SetColour
and
Wimp_TextColour
set a foreground or background colour.
The same 16 colours are used with
Wimp_SetFontColours
and in window, icon and menu
definitions. Not all of the standard colours can be
accurately displayed in 256 colour screen modes. This
convertor uses a weighted least-squares algorithm.
This format is output by
ColourTrans_ReturnColourNumber
in 256 colour screen
modes with the default palette, for use with
OS_SetColour
. It is optimised for the video hardware,
which uses the lower 4 bits as a palette index but overrides
some bits of the palette entry with bits 4..7 of the colour
number. By default, the palette is configured as shown below.
It cannot radically change colours because it does not affect
the most significant bit of any colour component. The
peculiar bit assignment explains the order of colours offered
by the Paint application.
This format is output by ColourTrans_ReturnGCOL
in 256 colour screen modes with the default palette. It is
designed to be easier to work with than colour numbers: the
red, green and blue components are arranged more intuitively.
The interpretation of bits 0..2 and 6 still depends on the
palette. Packed GCOLs can be converted to colour numbers and
vice-versa by bit rearrangement or by using the ColourTrans
SWIs.
This format is used with
VDU commands 17 (set text colour) and 18 (set graphics
colour) in 256 colour screen modes with the default palette.
It is also required by BBC BASIC
's GCOL
and COLOUR
keywords.
The bottom 6 bits are the same as a packed GCOL shifted two
binary places right; bit 7 indicates whether to set a
foreground or background colour. The tint must be specified
separately using VDU command sequence 23,17,0..3 or the
TINT
keyword.
This 24 bit hexadecimal format is used to specify colours in HTML attribute values and style sheets. It can represent many more colours than available in a 256 colour screen mode. Each colour component has a resolution of 28 instead of 24 and the least significant bits of the red, green and blue components need not be equal. Conversions from HTML colour to one of the standard 256 colours (or 16 Wimp colours), give only approximate results. This convertor uses a weighted least-squares algorithm.
While you're in the area, you may also be interested in Star Fighter 3000 or the Guild of Spacing.