WireViz uses uppercase two-letter color codes. Concatenating codes describes a multicolored wire; quoted hexadecimal RGB strings provide custom colors. This reference follows the exact tables in WireViz 0.4.1 wv_colors.py.
Individual colors
| Code | Name | Native hex color |
|---|---|---|
BK |
Black | #000000 |
WH |
White | #ffffff |
GY |
Grey | #999999 |
PK |
Pink | #ff66cc |
RD |
Red | #ff0000 |
OG |
Orange | #ff8000 |
YE |
Yellow | #ffff00 |
OL |
Olive green | #708000 |
GN |
Green | #00ff00 |
TQ |
Turquoise | #00ffff |
LB |
Light blue | #a0dfff |
BU |
Blue | #0066ff |
VT |
Violet | #8000ff |
BN |
Brown | #895956 |
BG |
Beige | #ceb673 |
IV |
Ivory | #f5f0d0 |
SL |
Slate | #708090 |
CU |
Copper | #d6775e |
SN |
Tin | #aaaaaa |
SR |
Silver | #84878c |
GD |
Gold | #ffcf80 |
These are the library's display colors, not a colorimetric manufacturing specification. Code matching is case-sensitive: use RD, not rd. An unknown short code can produce a warning and a white fallback, so a rendered diagram is not proof that every color token was recognized.
Multicolored wires and custom RGB
cables:
W1:
colors: [GNYE, WHBU, RDBK, "#112233", "#FFFF00:#009900"]
length: 1
GNYE means green/yellow; no slash or space is inserted between the two codes. With exactly two colors, the native renderer repeats the first color to form a three-band striped appearance. Three or more concatenated color codes are also supported. Hex colors are separated with a colon when more than one is needed.
Always quote a value starting with #, because an unquoted hash introduces a YAML comment. Use complete six-digit RGB values. The low-level hex parser does not fully validate every length that later translation or Graphviz rendering expects.
The color-bearing fields have different roles:
- Connector
colordescribes the body;pincolorsmarks individual pin rows. - Cable
colordescribes the jacket;colorsspecifies conductor colors. - Cable
shieldcan contain a color in place oftrue. bgcolorfields change diagram cells or backgrounds.
Built-in cable palettes
color_code |
Contents or purpose | Palette length |
|---|---|---|
DIN |
DIN 47100 sequence, beginning WH, BN, GN, YE, GY, PK, BU, RD, BK, VT. | 60 |
IEC |
BN, RD, OG, YE, GN, BU, VT, GY, WH, BK. | 10 |
BW |
Alternating BK and WH. | 2 |
TEL |
25-pair telephone sequence, ring followed by tip for each pair. | 50 |
TELALT |
Alternate 25-pair sequence, tip followed by ring; the first five ring wires use single minor colors. | 50 |
T568A |
WHGN, GN, WHOG, BU, WHBU, OG, WHBN, BN. | 8 |
T568B |
WHOG, OG, WHGN, BU, WHBU, GN, WHBN, BN. | 8 |
These are color sequences. Selecting T568B does not enforce a connector pinout, create twisted-pair geometry, or certify an Ethernet cable. You still define the connections.
connectors:
X1: {pincount: 4}
X2: {pincount: 4}
cables:
W1:
wirecount: 4
color_code: DIN
gauge: 0.25
length: 0.6
connections:
- - X1: [1-4]
- W1: [1-4]
- X2: [1-4]
The example takes the first four DIN colors. A count longer than the palette repeats the sequence. An explicit nonempty colors list overrides color_code, and color_code alone does not establish a count. See cable count rules.
Displaying color names
Set options.color_mode to choose textual labels in native output:
| Mode | Example for RD |
|---|---|
short / SHORT |
rd / RD |
full / FULL |
red / RED |
hex / HEX |
#ff0000 / #FF0000 |
ger / GER |
rt / RT |
The default is SHORT. Mixed capitalization such as Short is not accepted. Changing the display mode does not change source color codes or connection references. Hex values that match a built-in color can be translated to that color's name; custom RGB values use a numeric fallback when a named translation is requested.