Every operational line starts with a colour. It is a code defined by a
!COLOUR line, one of two inherited codes, or a value that carries the colour
itself. The official codes are defined in LDConfig.ldr, which is installed
with the parts library and updated with it; the
colour table lists all of them.
Colour values on a line
| Value | Meaning |
|---|---|
16 | Main colour: the colour of the line that referenced this file. |
24 | Edge colour: the contrasting edge colour defined for that inherited colour. Strongly discouraged on lines other than types 2 and 5. |
0x2RRGGBB | Direct colour: a 24-bit RGB value, hexadecimal letters in capitals. Discouraged in models. |
256 to 511 (old files) | Dithered colour, obsolete. |
| other codes | As defined by !COLOUR. |
Codes 16 and 24 are reserved.
Dithered colours
The original program could mix two of its first sixteen colours. The idea is obsolete and new software need not support it. For a code nb, the two colours are n1 = (nb − 256) ÷ 16 (whole part) and n2 = (nb − 256) mod 16, so nb = n1 × 16 + n2 + 256. The colour drawn is the average of the two values below, which are those of the original program, not of the current colour definitions.
| n | R, G, B | n | R, G, B |
|---|---|---|---|
| 0 | 51, 51, 51 | 8 | 102, 102, 88 |
| 1 | 0, 51, 178 | 9 | 0, 128, 255 |
| 2 | 0, 127, 51 | 10 | 51, 255, 102 |
| 3 | 0, 181, 166 | 11 | 171, 253, 249 |
| 4 | 204, 0, 0 | 12 | 255, 0, 0 |
| 5 | 255, 51, 153 | 13 | 255, 176, 204 |
| 6 | 102, 51, 0 | 14 | 255, 229, 0 |
| 7 | 153, 153, 153 | 15 | 255, 255, 255 |
!COLOUR definition
0 !COLOUR name CODE x VALUE v EDGE e [ALPHA a] [LUMINANCE l]
[CHROME | PEARLESCENT | RUBBER | MATTE_METALLIC | METAL | MATERIAL <parameters>]
Keywords are not case-sensitive. Numbers are decimal; RGB values are hexadecimal with a
leading # or 0x; byte values run from 0 to 255. Names and
identifiers use letters, digits and underscores, start with a letter and are not
case-sensitive.
| Field | Required | Meaning |
|---|---|---|
| name | yes | Colour name. |
CODE | yes | The number or identifier used on lines. Codes 0 to 511 are needed for strict compatibility; otherwise any identifier is allowed. |
VALUE | yes | 24-bit RGB main colour. |
EDGE | yes | Edge colour, as another colour code or an RGB value. |
ALPHA | no | Opacity from 0 (clear) to 255 (opaque). Official transparent colours use 128; 0 hides the surface. |
LUMINANCE | no | Glow; rarely used. |
The tag list also contains DITHER, which the specification does not define.
Finishes
A definition has at most one finish. MATERIAL should come last because the
rest of the line is its parameters.
| Tag | Surface |
|---|---|
CHROME | Chrome plated |
PEARLESCENT | Pearlescent plastic |
RUBBER | Rubber |
MATTE_METALLIC | Matte metallic |
METAL | Metal |
MATERIAL … | A material with parameters, below |
Materials
MATERIAL GLITTER VALUE v [ALPHA a] [LUMINANCE l] FRACTION f VFRACTION vf (SIZE s | MINSIZE min MAXSIZE max)
MATERIAL SPECKLE VALUE v [ALPHA a] [LUMINANCE l] FRACTION f (SIZE s | MINSIZE min MAXSIZE max)
MATERIAL FABRIC [VELVET | CANVAS | STRING | FUR]
FABRIC was added in 2025; without a variant it is the cloth of minifigure capes.| Parameter | Meaning |
|---|---|
VALUE | Colour of the flecks. |
ALPHA, LUMINANCE | Opacity and glow of the flecks. |
FRACTION | Share of the surface covered, above 0 and below 1. |
VFRACTION | Share of the volume filled, for volume renderers (glitter). |
SIZE | Fleck size in LDraw units, above 0. |
MINSIZE, MAXSIZE | A range of sizes instead of SIZE; the two go together. |
Scope
A !COLOUR line may appear anywhere. It applies from that line to the end of
the file and is passed down to files referenced after it. Definitions in
LDConfig.ldr apply everywhere. Official parts and primitives do not define
colours. The header of LDConfig.ldr carries
0 !LDRAW_ORG Configuration UPDATE YYYY-MM-DD.
0 !COLOUR Black CODE 0 VALUE #1B2A34 EDGE #808080
0 !COLOUR Speckle_Black_Silver CODE 132 VALUE #000000 EDGE #595959 MATERIAL SPECKLE VALUE #595959 FRACTION 0.4 MINSIZE 1 MAXSIZE 3
LDConfig.ldr (spacing reduced), and the speckled example from the colour specification.