Nomadys-PDF

Themes and dark mode

Fifteen themes, each light and dark#

Built from the official palettes, each with a light and a dark mode (i switches between them while reading). Every one keeps its text readable, with the ink of dark pages at least 11:1 against the paper, the text of the interface at least 7:1, its dim text at least 4.5:1.

ThemeLight / dark
gruvboxlight / dark
tokyonightDay / Night
catppuccinLatte / Mocha
rosepineDawn / Main
kanagawaLotus / Wave
everforestlight / dark
draculaAlucard / Dracula
nordlight / dark
solarizedlight / dark
flexokilight / dark (made for reading, with warm paper and soft ink)
githublight / dark
oneOne Light / One Dark
ayulight / dark
nightfoxDayfox / Nightfox
selenizedlight / dark (made for contrast)

the themes

The menus and bars (tab bar, status line, help, panel, library, page grid, the theme list) are always in the dark mode of your theme, whatever the pages show. Only the pages change with i, and the paper stays light until you switch to dark mode.

Choosing one#

Trying themes live

\T (or :theme) lists the themes with small samples of both modes.

KeyAction
j k (↓ ↑, Tab)move; each theme is applied at once, so you see it on your PDF
ishow the other mode (light / dark)
Enterkeep it, and write include = NAME in your configuration (the rest of the file is left as it is)
Esc, qgo back to the theme you had

:theme NAME switches directly (Tab completes the names).

Your own theme#

:theme new NAME writes ~/.config/nomadys-pdf/themes/NAME.conf, started from the theme in use, with every colour explained on its line, like this.

# Around the pages
background = #282828         # the window behind and between the pages
page_bg = #282828            # dark mode: the paper of the pages
...
search_match = #fabd2f       # search matches, link letters (f), the crop frame

Change any #rrggbb and save, and the open window shows it immediately. A wrong value is reported with its line, and the rest still works. Your themes appear in the \T list marked "yours".

A theme file has a [light] and a [dark] section. Single colours can also be changed in the configuration, in [light] / [dark] sections after the include line.

Every colour#

NamePaints
backgroundthe window behind and between the pages
page_bg, page_fgin dark mode, the paper and the ink of the pages
shadowthe soft shadow around pages
tab_bg, tab_fgthe tab bar
tab_active_bg, tab_active_fgthe current tab
tab_accentaccents such as the current tab, the frame of the focused pane, selected rows, matches in lists, the link letters
bar_bg, bar_fg, bar_cursorthe : and / line, and its cursor
message_bg, message_fgmessages in the corner
panel_bg, panel_fg, panel_headerthe panel, help, lists; its dim text
panel_selected_bg, panel_selected_fgthe selected row
comment_bg, comment_fgthe comment box
comment_markerthe dot on highlights that have a comment
selectiontext being selected
search_matchsearch matches, the crop frame, the preview marks
hint_bg, hint_fgthe link letters (f, F), their badge and their letters. Left out, the badge takes tab_accent and the letters the theme's light ink (or its dark ink on a light accent)
caretthe text cursor and the free cursor
form_focusthe form field being filled
mode_normal, mode_cursor, mode_visual, mode_area, mode_insert, mode_commandthe mode badge

Dark mode#

Dark mode recolours the pages. What has no colour (the paper, text, lines, greys) is inverted, with the theme's page_bg and page_fg as paper and ink. Coloured areas keep their colours, such as the shapes of a diagram, bars and panels (a pale face stays pale instead of turning brown); a dark one is only lightened. Coloured text and lines keep their hue and become light, so red text, a blue link or the curves of a plot stay readable on the dark paper and still match their legend; the label on a coloured shape keeps its ink. The ink is given more weight than a plain inversion would, so light letters and thin lines on dark paper look as firm as dark ones on white; dark_text_weight sets how much (1 a plain inversion, 2.5 by default, higher is bolder).

Images are taken apart (dark_images = smart, the default), since a figure often holds photos, renders and plots side by side, or on light panels. Each piece gets its own treatment.

Highlights stay readable, because the text under them keeps the theme's ink and only the paper around the letters takes the highlight's colour, lighter on an area (Ctrl-v, then C V B N M) than on text, so a figure under an area highlight keeps its colours.

dark_images = keep leaves every image as it is; invert recolours all of them, pictures you placed included. Copying a region as an image and printing always use the page's own colours.

Dark mode is remembered per file.

Fonts#

The interface font is any font installed on your system, Nerd Fonts included (fc-list : family lists them), set like this.

font = CaskaydiaCove NF
font_size = 10.5

Pages always use the fonts of the PDF itself.