modl Manual Override Diagram Language Open the editor

Sizes, shapes, lines & colors

modl has 28 reserved words: six sizes, six node shapes, four line styles and twelve colors. They are recognized only in lowercase, and only in their attribute slot.

Sizes

A size scales a node by a fixed factor of the normal node box, 110 × 64 pixels. For edges, size scales only the label. Labels never go below 10px.

SizeScaleNode boxNode labelEdge label
tiny¼×27.5 × 1610px10pxtry it
small½×55 × 3210px10pxtry it
normal1×110 × 6413px12pxtry it
big2×220 × 12826px24pxtry it
bigger4×440 × 25652px48pxtry it
huge8×880 × 512104px96pxtry it
tiny through big
tiny   tiny square teal
small  small square teal
normal normal square teal
big    big square teal
Open in editor
bigger and huge need room (zoom out with −)
bigger bigger circle orange
huge   huge circle red
bigger -> huge bold
Open in editor

For an image node, a size means "fit the picture inside this box". Without a size, the image is shown at its natural size.

Node shapes

ShapeDrawn as
circlea circle (the default)try it
squarea rounded rectangle, wider than talltry it
diamonda rhombus filling the node boxtry it
trianglea triangle pointing uptry it
hexa hexagon with flat top and bottomtry it
noneno outline: just the label, in the node's colortry it
All six shapes
circle   big circle blue
square   big square blue
diamond  big diamond blue
triangle big triangle blue
hex      big hex blue
none     big none blue
Open in editor

Edges stop at the outline of the shape they point to. A none node has no outline, so arrows run almost to the middle of its label. That makes none best for free-floating captions and titles:

Captions with none
title big none white System overview
note  small none gray (b is optional)
a square blue Required
b square purple Optional
a -> b dashed
Open in editor

Line styles

StyleDrawn as
solida continuous 2.2px line (the default)try it
dashedlong dashestry it
dottedround dotstry it
bolda thicker, 3.5px solid linetry it
Line styles in a diagram
app -> db bold blue writes
app -> cache dashed teal reads
cache -> db dotted gray refill
app -> log dashed orange async
Open in editor

Colors

The same twelve colors work for nodes, edges and the background. On a node, the color tints a translucent fill and draws the outline. On an edge, it colors the line and arrowhead. As a background, it is used solid.

ColorValue
gray#9aa4b2 (default)node & edgebackground
black#1f2937node & edgebackground
white#f8fafcnode & edgebackground
red#ef4444node & edgebackground
orange#f97316node & edgebackground
yellow#eab308node & edgebackground
green#22c55enode & edgebackground
teal#14b8a6node & edgebackground
blue#3b82f6node & edgebackground
purple#a855f7node & edgebackground
pink#ec4899node & edgebackground
brown#92400enode & edgebackground
The whole palette
gray   square gray
black  square black
white  square white
red    square red
orange square orange
yellow square yellow
green  square green
teal   square teal
blue   square blue
purple square purple
pink   square pink
brown  square brown
gray -> black -> white -> red gray
orange -> yellow -> green -> teal gray
blue -> purple -> pink -> brown gray
Open in editor

The palette nodes need a shape (or any attribute) because a line holding only a color name sets the background.

Label color and backgrounds

A node's label color is chosen from the node's color alone. white, yellow and green nodes get dark labels, and the other nine colors get light labels. The background isn't taken into account, and node fills are mostly transparent, so:

Dark background: avoid white, yellow, green
black
a square blue Readable
b square purple Readable
c square yellow Hard to read
d square green Hard to read
a -> b
c -> d
Open in editor
Light background: prefer white, yellow, green
white
a square yellow Readable
b square green Readable
c square blue Hard to read
d square purple Hard to read
a -> b black
c -> d black
Open in editor