Skip to content
Smart Templates Manual Website Manual for your AI

Border, background and colors

In short

Texts, groups, rectangles and shapes can have a fill color and a border; texts also have inner margins. You set every color through the same color field and the same color picker, either fixed or from a color variable. This page explains what the fields do and which defaults apply, how a color code is written, and what an empty or invalid color field means. You should know two differences between the canvas and the PDF: in the PDF the border sits centered on the edge, and the canvas calculates a color from a variable with the sample data. The pages on texts, shapes, groups and tables only mention what is different for them.

Border and background

Texts, groups, rectangles and shapes can have a fill color and a border. The fields are named slightly differently for each type of object; the operation is the same everywhere. An image has no border and no background; you crop its shape with “Shape” (see The properties of an image).

On the left a small white page with a selected text “Payable within 14 days without deduction.” in a pale yellow box with a blue selection frame and two handles on the left and right; a golden line runs only along the bottom edge of the box, otherwise there is no border line. Below the page is the button “Add page”. On the right the “Properties” window with the section “Border & background”: a color field “Background” (with ⓘ) with a light yellow swatch and the code “#FFF4D6”; a checked box “Turn on border” (with ⓘ); the color field “Border color” with a golden swatch and “#C9971A”; the field “Border thickness (pt)” (with ⓘ) with 1.5; “Border lines (sides)” (with ⓘ) with four checkboxes in two rows (“Top”, “Right”, “Bottom”, “Left”), of which only “Bottom” is checked; an empty field “Corner radius (mm)” (with ⓘ).
A text with a background and only one border line at the bottom, and the fields that set this.
  1. 1The result on the page: a background and a line only at the bottom.
  2. 2Color field: the swatch on the left, the color code on the right.
  3. 3Only with this checkbox do the color, thickness and sides appear.
  4. 4Only “Bottom” is checked here.
  5. 5The corner radius rounds the background and the border.

What the fields are called

Type of objectFieldsSpecial features
Text “Background”, “Turn on border”, “Border color”, “Border thickness (pt)”, “Border lines (sides)”, “Corner radius (mm)” Section “Border & background”. “Border color” has no ⓘ here.
Group “Background”, “Turn on border”, “Border color”, “Border thickness (pt)”, “Border lines (sides)”, “Corner radius (mm)” Section “Background & border” on the “General” tab, also in the group designer (see Groups: The “General” tab).
Rectangle “Background”, “Border”, “Border (pt)”, “Corner radius (mm)” Section “Style”. No checkbox; a color under “Border” is enough. No choice of sides, no “Line style”. You can also drag the corner radius with the yellow diamond (see Rounded corners).
Circle and ellipse, triangle, star, polygon “Background”, “Border”, “Border (pt)”, “Line style” Section “Style”. No corner radius (see Which shape has which field).
Line and arrow “Color”, “Thickness (pt)”, “Line style” Section “Style”. No fill; the arrowhead has the line color (see Line and arrow).
Cells in the column designer and header designer Section “Border” with “Turn on border”, “Border color”, “Border thickness (pt)”, “Border lines (sides)”, plus “⇊ Apply to all columns” or “⇊ Apply to all header cells” The same fields appear for a selected column on the “Column” tab once the column designer has been opened (see Data tables: The settings of a column). What the checkbox sets is in the table under What the fields do.
Cells in the cell designer of an extra row or a free-form table The fields of a group (see the row “Group”) Each of these cells is a small group inside. What is different for a cell is explained under Background, border and size of a cell.
Multiple selection “Fill color”, “Border color”, “Border thickness (pt)” See Several objects at once.

You set the border around every page under “Page border” when nothing is selected (see Page border). The header background and the banded rows of a table are under Data tables: The “Style” section.

What the fields do

SettingWhat it doesDefault
“Background” (with multiple selection “Fill color”) Fills the area behind the content. Without a color it is transparent; the paper shows through. For a group it covers the whole group, in the group designer the whole work area. For a text, the area in the PDF is as tall as the text including its inner margins; with a fixed height it is therefore taller or shorter there than on the canvas, which shows it as tall as the number entered (see Texts: Width and height). With “Automatic height” it reaches at least as far as the “Min. height” and at most as far as the “Max. height” (see Texts: Min. height and max. height). If the object is split at the end of the page, each page gets its piece (see Across several pages). Text and group: none
Group inside a group: #F5F7FC
Shapes: see Defaults when creating
“Turn on border” (text, group, cell) Turns the border on. Only then do the color, thickness and sides appear. What turning it on sets and turning it off clears depends on the location (see the next table). off
Group inside a group: on
“Border color”, “Border”, “Color” The color of the line, fixed or from a color variable (see Color field and color picker). For a text and a group, an emptied field turns the border off; for a rectangle and shapes there is then no outline. What an empty or invalid field means otherwise is explained under Empty color field and Invalid color. Text and group: #333333 when turned on
Group inside a group: #2B4CC4
Cells: see the next table
Shapes: see Defaults when creating
“Border thickness (pt)”, “Border (pt)”, “Thickness (pt)” The thickness of the line in points; 1 pt is about 0.35 mm. 0 means no line; for an arrow the whole arrow including its arrowheads disappears. An empty field counts as 1 pt. At 0 the background and fill remain. The field does not accept the minus key; if you paste a negative number, it discards it and shows the old value again. What else applies to shapes is explained under Thickness and border (pt). empty (1 pt)
Group inside a group: 0.75 pt
Shapes: see Defaults when creating
“Border lines (sides)” with “Top”, “Right”, “Bottom”, “Left” (text, group, cell) Which sides get a line, for example only a dividing line at the bottom. As long as you click nothing, all four are checked: a closed box. Every click saves the choice; if all are unchecked, there is no line and the fill remains. all four
“Corner radius (mm)” (text, group, rectangle, table) Rounds the corners of the background and the border; 0 is square. For a text and a group the field is always there, even without a border, and then rounds the fill. Without a background and border it has no effect. At most half of the shorter side is effective; a larger value does not round any further. If you have clicked a checkbox under “Border lines (sides)” once, only the area becomes round in the PDF and the lines stay straight, even if all four are checked again afterward; the canvas bends them along at the corners. You get a round border back by turning “Turn on border” off and on again; then enter the border color again. For a rectangle you can also drag the radius with the yellow diamond (see Rounded corners). Whether a table stays round depends on whether it fits entirely on one page (see Data tables: Border, corners, guide lines, visibility). In a cell of a free-form table or an extra row the field is there but does not round the cell (see Background, border and size of a cell). empty (square)
“Line style” (line, arrow, circle and ellipse, triangle, star, polygon) “solid”, “dashed” or “dotted”. With thick lines the canvas and the PDF look slightly different (see Line style). solid

What the checkbox “Turn on border” sets depends on the location:

LocationTurning it on setsTurning it off clears
Text, group, cell in the cell designer of an extra row or a free-form table if a color is missing, dark gray #333333; plus all four sides. The thickness stays as it is; an empty field counts as 1 pt The color and the choice of sides; the thickness and corner radius stay
Group inside a group nothing: the border is on from the start, with #2B4CC4 and 0.75 pt as for a group
Cells in the column designer and header designer light gray #CCCCCC with 0.5 pt on all four sides the whole cell border, including its thickness

Where the line sits

In the PDF a border always sits centered on the edge, half outside and half inside. A thick line therefore extends beyond the area by half its thickness. The canvas does not show this the same way for every object:

ObjectCanvasPDF
Text, circle, ellipse, triangle, star, polygon, line and arrowcentered on the edgecentered on the edge
Rectangle, group, table cellentirely insidecentered on the edge

If two neighboring cells each have a line on their shared edge, both lie on top of each other in the PDF and look like a single thick line; on the canvas they lie side by side and look twice as thick. A rectangle of 40 × 20 mm with a 6 pt border measures 42.1 × 22.1 mm on the outside in the PDF and 40 × 20 mm on the canvas. How to get a rectangle to exact outer dimensions in the PDF is explained under Shapes: Canvas and PDF compared. The page border, too, sits with its stroke centered on the line; whatever extends beyond the page edge at a distance of 0 is missing (see Page border).

Across several pages

If a text, a group or a rectangle is split at the page edge, each page gets its piece of the background and border. When an object is split and when it moves on as a whole is explained under Keep together at page break.

  • A rectangle and every text or group whose “Border lines (sides)” you have never clicked get a closed border on every page.
  • If you have chosen the sides, the lines on the left and right run on every page up to the break. The line at the top appears only where the box begins, the line at the bottom only where it ends.
  • In both cases rounding does not apply to any of the pieces: all pieces are completely square, even at the edges that were not cut.

Inner margins

Only a text has inner margins. They are in the section “Inner margins (mm)”, directly in the document on the “General” tab.

SettingWhat it doesDefault
“Top”, “Bottom”, “Left”, “Right” The distance between the text and the edge or border of the text box, per side in millimeters. At 0 the text sits directly at the edge. Left and right make the lines narrower: the text wraps at the width of the box minus both distances. Top and bottom make the box taller. An empty field removes the value. empty (0)

Below the fields is “Moves the text inward from the edge/border.” with an ⓘ. On the canvas and in the PDF the distances have the same effect; the window “Edit text” indents its paper in the same way. Together with a border this creates a text box with an outline.

  • A group has no inner margins. Move the objects in it away from the edge with “X (mm)” and “Y (mm)”.
  • Tables have a “Cell padding (mm)” for all cells (see Data tables: The “Cells” section).
  • The “Line spacing” of a text is described in Texts: Line spacing.

Color field and color picker

You set every color through the same color field and the same color picker: for the background and border, for lines, for table colors, for the page border, in the multiple selection and for the font color in the window “Edit text”. A color can be fixed, translucent or come from a color variable.

The color field

ControlWhat it does
Color swatch Shows the color. If no color or an invalid color is entered, it shows a checkerboard with “∅”; with a translucent color the checkerboard shows through. If the color comes from a variable, the swatch has a blue inner ring, and the mouse pointer names the variable and what it currently gives. A click opens the window “Choose a color”.
Field next to it (gray “none”) Here you type the color code; the notations are explained in the next section. Every entry takes effect immediately. Empty means: no color. Anything that is not a color code, such as “red”, puts a red frame around the field (see Invalid color).

Which notations apply

A color code consists of # and three, six or eight characters from 0 to 9 and a to f (uppercase or lowercase), for example #d13438. With eight characters the last two are the opacity: #RRGGBBAA. How strictly the code is checked and what is added depends on where the color is located:

Where the color isWhat applies
Color field on an object, entered as a fixed value (background, border, line, page border, table colors) #RRGGBB, short #RGB, with opacity #RRGGBBAA or #RGBA. The # may be missing, spaces at the edge do no harm. Anything else is not a color.
Color field on an object, color from a color variable The value that the variable gives must itself be a finished code with #: #RGB, #RRGGBB or #RRGGBBAA. If the variable reads it from a field and the # is missing there, it is not added; #RGBA does not apply. Otherwise it is not a color.
Color of a text passage (window “Edit text”) #RGB, #RRGGBB or #RRGGBBAA. A missing # is added, so “aabbcc” becomes #aabbcc; #RGBA does not apply. If the value gives no color, the passage keeps the color of its surroundings (see Invalid color).
Fixed value in a color variable (window for custom variables) #RGB, #RRGGBB or #RRGGBBAA. When you leave the field, the window adds a missing #; the variable does not accept #RGBA. When saving, every fixed value is checked strictly (see Variables: A fixed color).
Template file (for developers) As for a color field with a fixed value (see Template format: Basic rules).

Color names such as “red” or “rot” are not known in any of these places; they count as no color. Nothing is guessed.

Empty color field

An empty field means: no color. What that means depends on the field:

  • Background and fill color: no area.
  • “Header background” in the header designer: the header background of the whole table applies again (see Cells, header row and page break: The header designer).
  • Border for text, group, rectangle and shapes: no line.
  • “Color” for line and arrow: black, although the field says “none”, also after “No color” in the color picker (see Colors for shapes).
  • Page border: dark gray (see Page border).

Invalid color

A fixed value that is not a color code, such as “red” or a typo, puts a red frame around the field. The mouse pointer then says: “That is not a color code — something like #d13438 is expected. Anything that is not a color draws nothing, neither on the canvas nor in the document.” The field only marks it and changes nothing about your entry. Even a half-typed code such as “#d1” has a red frame briefly until it is complete.

On the canvas and in the PDF a color field with an invalid code draws nothing; only this field drops out: an invalid background or an invalid fill color gives no area, an invalid border no line. The other colors of the object remain. For a line and an arrow the whole shape is missing. This applies to every object, including a group and the page border. It is reported only in the PDF, when it is created, with “color '…' is not a known color code - it was treated as no color: where it is used, no fill or no line is drawn (a line or arrow is left out), and a text in that color prints black. The other colors of the element stay. Use a code like #C0392B.”

Two things apply to text:

  • A single colored passage whose color gives no color keeps the color of its surroundings: that of the surrounding passage, otherwise that of the text. This applies to an invalid value as well as to a color variable without a result. The PDF reports an invalid fixed value when it is created, once per value, with “color '…' in a text passage is not a known color code - the passage keeps the color of the text around it. Use a code like #C0392B.”; it does not report a color variable or a field without a color value.
  • A text as a whole turns black if its base color gives no color. Only older templates carry a base color on the whole text; the designer has no field for it (see Texts: Font, size, color and alignment).

The window “Choose a color”

A click on a color swatch opens the window “Choose a color”. Everything you drag or type in it you see immediately on the object; “Cancel” restores the old state.

The window “Choose a color”, a white window with rounded corners on a darkened background. At the top left the heading “Choose a color”. Below it a large color area in shades of blue: almost white at the top left, increasingly saturated blue toward the right, darkening to black toward the bottom; in the upper right half a small round dot with a white edge. Below it a rainbow bar for the hue with a round handle in the blue range and an opacity bar that begins transparent (checkered) on the left and turns into full blue on the right, with a handle at about 70 percent. In the next row a small checkered, blue-tinted square as a preview, a field with the code “#2b4cc4b3” and a field with “70 %”. Below it a button “ƒ Variable …” with the gray addition “for if-then colors”. At the bottom left the quiet button “No color”, on the right “Cancel” (white) and “Apply” (blue).
The window “Choose a color”.
  1. 1Color area: saturation (horizontal) and brightness (vertical).
  2. 2Hue bar.
  3. 3Opacity bar: transparent on the left, opaque on the right.
  4. 4Here you type the color code and the opacity.
  5. 5Binds the color to a color variable.
  6. 6Close: without a color, without a change, or with the chosen color.
ControlWhat it does
Color areaClicking or dragging selects the saturation (horizontal) and the brightness (vertical). If the field had no color yet, the round dot is missing; the very first touch of the color area, the hue bar or the opacity bar sets a color, and the dot appears.
Hue barThe rainbow bar sets the hue.
Opacity bar and number field with %The opacity from 0 to 100 %: the bar is transparent on the left and opaque on the right; in the number field you type the value (tooltip “Opacity in %”). Below 100 % the color becomes translucent, on the canvas as in the PDF.
PreviewThe small square shows the color that is set.
Field “#rrggbb”Here you type the color code. Every readable state takes effect immediately.
“ƒ Variable …” with the addition “for if-then colors”Binds the color to a color variable (see Color from a variable).
“No color”Empties the field and closes the window. In the window “Edit text” it removes the color from the selection.
“Cancel”Restores the color from when the window was opened and closes. Esc and a click beside the window work the same way. In the multiple selection every object gets its own color back.
“Apply”Closes with the chosen color. Enter does the same (except on a button). The code is written uniformly (#rrggbb, with opacity #rrggbbaa). If an invalid value such as “red” was in the field and you do not choose a color, the field is emptied. If a color variable is chosen, the variable is saved, not its color.

Color from a variable

If a color is to depend on the data, such as red for an overdue invoice, use a color variable with if-then branches (see Variables: If branches).

  1. Click the color swatch. The window “Choose a color” opens.
  2. Click “ƒ Variable …”. A menu shows the “Color variables” at the top, below them in a paler shade the “Other custom variables” and at the very bottom “New color variable …”. To the right of each variable it shows what it currently gives: a color code, if needed with the addition “(ELSE)”, or “no color”; for the other variables, which give no color, it shows their type there.
  3. Choose a variable. Instead of “ƒ Variable …” there is now a row with the name of the variable, “currently gives …” and the button “unlink”.
  4. Click “Apply”. The color is no longer fixed but comes from the variable when the document is created.

With “New color variable …” you create a new one right away: the window for custom variables opens with the type “Color”. After you save the variable, the designer inserts it and closes the color picker; with “Cancel” the color picker stays open. Close the variables window here with its buttons, not with Esc: as things stand, Esc first closes the color picker underneath (see Keyboard shortcuts: Esc in detail).

  • If there is no color variable yet, the group of the other variables is called “Custom variables”. If there is no custom variable at all, above “New color variable …” it only says “No custom variable yet — create one right here.” The menu does not offer variables of a rule.
  • “unlink” removes the connection; after that a fixed color applies again. Dragging in the color area or the bars and typing a color code also unlink it.
  • The canvas shows the result with the sample data, the PDF with the real data. If the variable gives no color when the document is created, whatever this color was supposed to draw is missing in the PDF; the other colors of the object remain. For a line and an arrow the whole shape is missing, for the page border the border. It is not reported. A colored text passage keeps the color of its surroundings in this case (see Invalid color).
  • If the variable gives no color with the sample data, the canvas shows the color under “ELSE” of the variable, provided there is a valid color there. This also applies if an if branch applies that reads, for example, an empty field. The mouse pointer on the color swatch then says “… gives no color with the sample data; the ELSE value … is shown”. In this case the PDF does not take the ELSE value as a substitute (see Full preview and PDF: What the canvas shows differently).

What changes in the document?

On the canvas

You see the background and border almost as in the PDF. The border of a rectangle, group and table cell does, however, sit entirely inside (see Where the line sits). A color from a variable is resolved with the sample data; if none results, the area shows the color under “ELSE” (see Color from a variable). An invalid color code draws nothing here, too, but is not reported.

In the PDF

The border sits centered on the edge, half outside and half inside. Color variables are resolved with the real data; if no color results, the PDF draws nothing. An invalid color code draws nothing and is reported. If an object is split at the end of the page, each page gets its piece of the background and border (see Across several pages).