Skip to content

Color Schemes

A color scheme sets the per-element colors Molkit uses to draw atom labels and the bonds attached to them. The scheme is an axis separate from the structure preset: the preset controls geometry and spacing (bond length, font size, label style), while the scheme controls which color each element gets. You can change one without touching the other. A scheme can hold a separate light table and dark table; the editor lets you set both on a custom scheme, though the built-in schemes ship with a single color table.

Built-in schemes

Molkit ships six schemes:

  • Simple: red oxygen, blue nitrogen, green halogens, and similar conventional colors. Element coloring on.
  • Black & White: every element drawn black. Element coloring off, so the canvas stays monochrome.
  • CPK (Jmol): the Jmol CPK palette (gray carbon, white hydrogen, red oxygen, blue nitrogen).
  • Colorblind Safe: a palette chosen to stay distinguishable for common color-vision deficiencies.
  • WCAG AA: darker, higher-contrast versions of the standard colors aimed at passing contrast checks.
  • Publication: all-black like Black & White, intended for print figures.

Schemes marked “element coloring off” draw everything in one color regardless of the per-element values stored in the scheme. Turn element coloring on (see the editor below) to make those values visible.

Switching schemes

Open the color-scheme dropup from the status bar at the bottom of the window. The status item labeled Scheme: shows the active scheme name; click it to open the menu. The menu lists the built-in schemes first, then any custom schemes you have saved, then actions to edit, save, or apply the scheme to all open tabs at once. Selecting a scheme applies it to the current document right away. An orange dot next to the scheme name means you have edited colors away from that scheme’s defaults; clicking anywhere on the status item (the dot included) opens the dropup, and re-selecting the active scheme there resets the colors to its defaults.

The Color Scheme Editor

Choose Edit Scheme... from the dropup to open the editor. It edits the per-element colors of the active scheme and can save the result as a new named scheme.

Editing colors

The editor opens in Visual view: a periodic-table grid where each cell is one element. Click a cell to edit its color; shift-click or drag to select a range and edit several at once. The Code view switches to a table of every element with separate Light and Dark color fields, a filter box (match by symbol, name, or category such as hal for halogens), and sort options (atomic number, alphabetical, by hue, modified first, warnings first).

The Light / Dark toggle in the header chooses which table you are editing, so a custom scheme can carry its own dark colors alongside its light ones.

Contrast checking

The toolbar has a Check against: selector (white, light gray, dark, canvas background, or a custom color). The editor computes a WCAG contrast ratio for each element against that background and flags elements that fall short, which helps when preparing figures that need readable labels.

Element coloring toggle

If element coloring is off, a banner reminds you that edited colors will not show until you enable it. The Grayscale checkbox in the toolbar previews how the scheme reads without color.

Saving, import, and export

  • Save as Scheme... stores the current colors under a name you choose. Saved schemes appear in the dropup under a Custom heading and persist in your browser.
  • Revert undoes edits back to the colors present when you opened the editor; Reset to Scheme restores the scheme’s defaults.
  • Export writes the scheme as CSS or JSON; Import reads colors from a CSS file (custom-property form) or a JSON file. This moves a scheme between documents or machines.

Click Done to keep your changes.

See also