Open source

Code themes

Ten themes for code editors and terminals. Eight are the contrast themes from the Zacess reader: Light, Dark, Yellow on Black, Cream, High Contrast Dark, High Contrast Light, Deep Contrast Dark and Deep Contrast Light, with every text and syntax colour at 7:1 or more. Warm Dark and Warm Light are the gentler pair for anyone who finds high contrast too intense: body text at about 12:1 in warm, earthy colours, with every text and syntax colour at 4.5:1 or more.

We build the themes for VS Code, JetBrains IDEs, Obsidian, Neovim, Zed, Sublime Text, Helix, Emacs, Eclipse, Xcode and eight terminals. They are on the VS Code Marketplace, Open VSX, the JetBrains Marketplace and the Eclipse Marketplace and in the Obsidian community directory and the Zed extension store. Neovim installs them from zacess.nvim. The eight contrast themes are in the iTerm2 Color Schemes collection. Sublime Text, Helix, Emacs, Xcode and the terminals install from the releases page or the themes repository. The browser themes are in the Chrome Web Store and on Firefox Add-ons.

Try a theme

Choose a theme and a language. The sample is coloured by the same theme files the editor extensions ship, with the theme's contrast figures underneath.

sample.tsZacess Light

// a reading profile, saved one file per profile
export interface Profile {
  name: string;
  fontSize: number;
  theme: "dark_on_light" | "yellow_on_black";
}

const AAA = 7;

/** WCAG relative luminance of a #rrggbb colour */
function luminance(hex: string): number {
  const [r, g, b] = [1, 3, 5].map((i) => parseInt(hex.slice(i, i + 2), 16) / 255);
  const lin = (c: number) => (c <= 0.04045 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4);
  return 0.2126 * lin(r) + 0.7152 * lin(g) + 0.0722 * lin(b);
}

export function passes(text: string, background: string): boolean {
  const [hi, lo] = [luminance(text), luminance(background)].sort((x, y) => y - x);
  const ratio = (hi + 0.05) / (lo + 0.05);
  if (ratio < AAA) {
    console.warn(`only ${ratio.toFixed(2)}:1`);
  }
  return ratio >= AAA;
}

TypeScript

The TypeScript sample from the code themes playground.

Rendered with the Zacess Light editor theme.

Background
#ffffff
Text
#111111
Lowest on the background
8.2:1
Lowest measured contrast
7.1:1
Target
7:1 (WCAG AAA)

All ten themes

The chosen language in every theme, so the ten can be compared side by side. The lowest ratio is measured over the selection, the current line and the diff colours, where text is hardest to read. The lowest code colour on the plain background is shown with each theme above.

Zacess Light
// a reading profile, saved one file per profile
export interface Profile {
  name: string;
  fontSize: number;
  theme: "dark_on_light" | "yellow_on_black";
}

const AAA = 7;

/** WCAG relative luminance of a #rrggbb colour */
function luminance(hex: string): number {
  const [r, g, b] = [1, 3, 5].map((i) => parseInt(hex.slice(i, i + 2), 16) / 255);
  const lin = (c: number) => (c <= 0.04045 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4);
  return 0.2126 * lin(r) + 0.7152 * lin(g) + 0.0722 * lin(b);
}

export function passes(text: string, background: string): boolean {
  const [hi, lo] = [luminance(text), luminance(background)].sort((x, y) => y - x);
  const ratio = (hi + 0.05) / (lo + 0.05);
  if (ratio < AAA) {
    console.warn(`only ${ratio.toFixed(2)}:1`);
  }
  return ratio >= AAA;
}

Everyday reading in a bright room. Lowest contrast 7.1:1.

Zacess Dark
// a reading profile, saved one file per profile
export interface Profile {
  name: string;
  fontSize: number;
  theme: "dark_on_light" | "yellow_on_black";
}

const AAA = 7;

/** WCAG relative luminance of a #rrggbb colour */
function luminance(hex: string): number {
  const [r, g, b] = [1, 3, 5].map((i) => parseInt(hex.slice(i, i + 2), 16) / 255);
  const lin = (c: number) => (c <= 0.04045 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4);
  return 0.2126 * lin(r) + 0.7152 * lin(g) + 0.0722 * lin(b);
}

export function passes(text: string, background: string): boolean {
  const [hi, lo] = [luminance(text), luminance(background)].sort((x, y) => y - x);
  const ratio = (hi + 0.05) / (lo + 0.05);
  if (ratio < AAA) {
    console.warn(`only ${ratio.toFixed(2)}:1`);
  }
  return ratio >= AAA;
}

Everyday reading in a dim room. Lowest contrast 7.0:1.

Zacess Yellow on Black
// a reading profile, saved one file per profile
export interface Profile {
  name: string;
  fontSize: number;
  theme: "dark_on_light" | "yellow_on_black";
}

const AAA = 7;

/** WCAG relative luminance of a #rrggbb colour */
function luminance(hex: string): number {
  const [r, g, b] = [1, 3, 5].map((i) => parseInt(hex.slice(i, i + 2), 16) / 255);
  const lin = (c: number) => (c <= 0.04045 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4);
  return 0.2126 * lin(r) + 0.7152 * lin(g) + 0.0722 * lin(b);
}

export function passes(text: string, background: string): boolean {
  const [hi, lo] = [luminance(text), luminance(background)].sort((x, y) => y - x);
  const ratio = (hi + 0.05) / (lo + 0.05);
  if (ratio < AAA) {
    console.warn(`only ${ratio.toFixed(2)}:1`);
  }
  return ratio >= AAA;
}

Low vision. Lowest contrast 7.0:1.

Zacess Cream
// a reading profile, saved one file per profile
export interface Profile {
  name: string;
  fontSize: number;
  theme: "dark_on_light" | "yellow_on_black";
}

const AAA = 7;

/** WCAG relative luminance of a #rrggbb colour */
function luminance(hex: string): number {
  const [r, g, b] = [1, 3, 5].map((i) => parseInt(hex.slice(i, i + 2), 16) / 255);
  const lin = (c: number) => (c <= 0.04045 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4);
  return 0.2126 * lin(r) + 0.7152 * lin(g) + 0.0722 * lin(b);
}

export function passes(text: string, background: string): boolean {
  const [hi, lo] = [luminance(text), luminance(background)].sort((x, y) => y - x);
  const ratio = (hi + 0.05) / (lo + 0.05);
  if (ratio < AAA) {
    console.warn(`only ${ratio.toFixed(2)}:1`);
  }
  return ratio >= AAA;
}

Dyslexia friendly reading. Lowest contrast 7.3:1.

Zacess High Contrast Dark
// a reading profile, saved one file per profile
export interface Profile {
  name: string;
  fontSize: number;
  theme: "dark_on_light" | "yellow_on_black";
}

const AAA = 7;

/** WCAG relative luminance of a #rrggbb colour */
function luminance(hex: string): number {
  const [r, g, b] = [1, 3, 5].map((i) => parseInt(hex.slice(i, i + 2), 16) / 255);
  const lin = (c: number) => (c <= 0.04045 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4);
  return 0.2126 * lin(r) + 0.7152 * lin(g) + 0.0722 * lin(b);
}

export function passes(text: string, background: string): boolean {
  const [hi, lo] = [luminance(text), luminance(background)].sort((x, y) => y - x);
  const ratio = (hi + 0.05) / (lo + 0.05);
  if (ratio < AAA) {
    console.warn(`only ${ratio.toFixed(2)}:1`);
  }
  return ratio >= AAA;
}

The highest contrast on a dark screen. Lowest contrast 7.1:1.

Zacess High Contrast Light
// a reading profile, saved one file per profile
export interface Profile {
  name: string;
  fontSize: number;
  theme: "dark_on_light" | "yellow_on_black";
}

const AAA = 7;

/** WCAG relative luminance of a #rrggbb colour */
function luminance(hex: string): number {
  const [r, g, b] = [1, 3, 5].map((i) => parseInt(hex.slice(i, i + 2), 16) / 255);
  const lin = (c: number) => (c <= 0.04045 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4);
  return 0.2126 * lin(r) + 0.7152 * lin(g) + 0.0722 * lin(b);
}

export function passes(text: string, background: string): boolean {
  const [hi, lo] = [luminance(text), luminance(background)].sort((x, y) => y - x);
  const ratio = (hi + 0.05) / (lo + 0.05);
  if (ratio < AAA) {
    console.warn(`only ${ratio.toFixed(2)}:1`);
  }
  return ratio >= AAA;
}

The highest contrast on a light screen. Lowest contrast 7.1:1.

Zacess Deep Contrast Dark
// a reading profile, saved one file per profile
export interface Profile {
  name: string;
  fontSize: number;
  theme: "dark_on_light" | "yellow_on_black";
}

const AAA = 7;

/** WCAG relative luminance of a #rrggbb colour */
function luminance(hex: string): number {
  const [r, g, b] = [1, 3, 5].map((i) => parseInt(hex.slice(i, i + 2), 16) / 255);
  const lin = (c: number) => (c <= 0.04045 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4);
  return 0.2126 * lin(r) + 0.7152 * lin(g) + 0.0722 * lin(b);
}

export function passes(text: string, background: string): boolean {
  const [hi, lo] = [luminance(text), luminance(background)].sort((x, y) => y - x);
  const ratio = (hi + 0.05) / (lo + 0.05);
  if (ratio < AAA) {
    console.warn(`only ${ratio.toFixed(2)}:1`);
  }
  return ratio >= AAA;
}

Low vision, with deep and fully saturated colours on black. Lowest contrast 7.0:1.

Zacess Deep Contrast Light
// a reading profile, saved one file per profile
export interface Profile {
  name: string;
  fontSize: number;
  theme: "dark_on_light" | "yellow_on_black";
}

const AAA = 7;

/** WCAG relative luminance of a #rrggbb colour */
function luminance(hex: string): number {
  const [r, g, b] = [1, 3, 5].map((i) => parseInt(hex.slice(i, i + 2), 16) / 255);
  const lin = (c: number) => (c <= 0.04045 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4);
  return 0.2126 * lin(r) + 0.7152 * lin(g) + 0.0722 * lin(b);
}

export function passes(text: string, background: string): boolean {
  const [hi, lo] = [luminance(text), luminance(background)].sort((x, y) => y - x);
  const ratio = (hi + 0.05) / (lo + 0.05);
  if (ratio < AAA) {
    console.warn(`only ${ratio.toFixed(2)}:1`);
  }
  return ratio >= AAA;
}

Low vision, with vivid deep colours on white. Lowest contrast 7.0:1.

Zacess Warm Dark
// a reading profile, saved one file per profile
export interface Profile {
  name: string;
  fontSize: number;
  theme: "dark_on_light" | "yellow_on_black";
}

const AAA = 7;

/** WCAG relative luminance of a #rrggbb colour */
function luminance(hex: string): number {
  const [r, g, b] = [1, 3, 5].map((i) => parseInt(hex.slice(i, i + 2), 16) / 255);
  const lin = (c: number) => (c <= 0.04045 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4);
  return 0.2126 * lin(r) + 0.7152 * lin(g) + 0.0722 * lin(b);
}

export function passes(text: string, background: string): boolean {
  const [hi, lo] = [luminance(text), luminance(background)].sort((x, y) => y - x);
  const ratio = (hi + 0.05) / (lo + 0.05);
  if (ratio < AAA) {
    console.warn(`only ${ratio.toFixed(2)}:1`);
  }
  return ratio >= AAA;
}

A gentler dark theme for anyone who finds high contrast too intense, with cream and earthy colours on warm brown. Lowest contrast 5.7:1.

Zacess Warm Light
// a reading profile, saved one file per profile
export interface Profile {
  name: string;
  fontSize: number;
  theme: "dark_on_light" | "yellow_on_black";
}

const AAA = 7;

/** WCAG relative luminance of a #rrggbb colour */
function luminance(hex: string): number {
  const [r, g, b] = [1, 3, 5].map((i) => parseInt(hex.slice(i, i + 2), 16) / 255);
  const lin = (c: number) => (c <= 0.04045 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4);
  return 0.2126 * lin(r) + 0.7152 * lin(g) + 0.0722 * lin(b);
}

export function passes(text: string, background: string): boolean {
  const [hi, lo] = [luminance(text), luminance(background)].sort((x, y) => y - x);
  const ratio = (hi + 0.05) / (lo + 0.05);
  if (ratio < AAA) {
    console.warn(`only ${ratio.toFixed(2)}:1`);
  }
  return ratio >= AAA;
}

A gentler light theme for anyone who finds high contrast too intense, with dark brown and earthy colours on warm paper. Lowest contrast 5.0:1.

The gentler Warm pair

Some people find high contrast too intense: glare, a halo around bright text or eye strain over a long session. Warm Dark and Warm Light are for them. Body text sits at about 12:1 in warm, earthy colours, cream on dark brown and dark brown on warm paper, with amber, rust, olive, teal, muted blue and rose. Every text and syntax colour keeps at least 4.5:1 (WCAG AA) while the other eight themes keep 7:1. Every other check, from the colour vision pairs to the selection, current line and find match, applies to them unchanged.

Zacess Warm Dark: TypeScript, Python, Rust, HTML and diff lines in cream and soft amber, rust, olive, teal and rose on warm dark brown, with bold keywords and italic comments
Zacess Warm Dark
Zacess Warm Light: the same code in dark brown and deep rust, olive, teal and plum on warm paper, with bold keywords and italic comments
Zacess Warm Light

Always know where you are

Contrast is only half of it. In many themes the selection, the line the cursor is on and the current search match are barely lighter than the background, so they are easy to lose. Every Zacess theme makes them stand out and the build measures each one.

  • A selection you can see

    In terminals and most editors, selected text sits on a solid block in a colour from the theme's own palette, the way a terminal draws it. In the eight contrast themes the block keeps 7.4:1 or more on the background and the text keeps 7.4:1 or more on the block. In Warm Dark and Warm Light both keep 6.5:1 or more.

  • A visible current line

    The line the cursor is on is a calm band at 1.3:1 to 1.4:1 on the background. Plain text, the line number and the cursor keep 7:1 over it and every syntax colour keeps 4.5:1.

  • Matches by shape as well as colour

    The current find match is a strong fill. Other matches, the word under the cursor and a matched bracket are outlined or underlined with no fill, so they never hide a character or pass for a selection. Yellow on Black underlines the word under the cursor with dashes in Neovim and dots in JetBrains IDEs.

  • Changed lines marked in the gutter

    Added, changed and removed lines are marked beside the code in VS Code, Neovim, Zed and Emacs, in colours checked against every other highlight.

Every measurement for each theme

In your browser

All ten themes also colour Chrome and Firefox: the tab strip, the toolbar, the address bar and the new tab page. Web pages keep their own colours. Text on each part keeps at least 7:1 contrast (4.5:1 in the Warm pair). Edge installs the Chrome themes once Allow extensions from other stores is turned on.

ThemeChrome and EdgeFirefox
Zacess LightChrome Web StoreFirefox Add-ons
Zacess DarkChrome Web StoreFirefox Add-ons
Zacess Yellow on BlackChrome Web StoreFirefox Add-ons
Zacess CreamChrome Web StoreFirefox Add-ons
Zacess High Contrast DarkChrome Web StoreFirefox Add-ons
Zacess High Contrast LightChrome Web StoreFirefox Add-ons
Zacess Deep Contrast DarkChrome Web StoreFirefox Add-ons
Zacess Deep Contrast LightChrome Web StoreFirefox Add-ons
Zacess Warm DarkChrome Web StoreFirefox Add-ons
Zacess Warm LightChrome Web StoreFirefox Add-ons

Install

Packaged files are attached to each release on the releases page. Every editor's files can also be taken straight from the themes repository. The install page lists every editor and terminal with its one step.

Something hard to read?

A contrast or readability problem is a bug. Tell us with the readability form on GitHub or email contact@zacess.com. You never need to share a diagnosis.