Skip to content

A perceptually balanced color scheme based on Atomic and inspired by Solarized. It was designed using HSLuv and ΔE00 to ensure harmony and contrast across light and dark modes.

License

Notifications You must be signed in to change notification settings

gerardbm/cosmic

Repository files navigation

Cosmic Color Scheme

Multiple colors for multiple applications

Cosmic is a dark color scheme designed for use in terminals, following the style of its predecessor, Atomic. It was calculated using HSLuv and the CIEDE2000 Delta E (ΔE00) metric, while taking inspiration from the background color of Solarized. This repository includes support for URxvt and XTerm.

To use it in Vim/Neovim, check out the vim-cosmic repository.

Cosmic Lunar Screenshot

Cosmic Solar Screenshot

Color palette

The color palette consists of sixteen precision colors selected procedurally through algorithms. Colors are distributed across six distinct hues and four levels of perceived lightness, based on the perceptually uniform color space HSLuv —an alternative to HSL designed to better reflect human perception of color differences.

Unlike traditional HSL, HSLuv ensures that equal lightness values correspond more closely to equal perceived brightess. Human nvision doesn't perceive brightess linearly: for example, a pure green color (#00FF00) appears brighter than pure red (#FF0000), despite having the same nominal lightness in HSL. To address this, the palette uses HSLuv to balance the perceived lightness consistently, with dark colors using 65% lightness and bright colors using 73%.

Regarding hue selection: although there are six main hues, they are not spaced evenly by degrees (e.g., every 60°). This is because human perception is not uniform around the hue wheel: for example, some colors, like blue and cyan, require greater angular separation to be distinguishable, while reds and oranges can be closer. To ensure perceptual distinctness between hues, their separation has been validated using the CIEDE2000 Delta E (ΔE00) formula, a standard metric for color difference in the CIE LAB color space.

It comes with two modes: the dark mode, called Lunar, and the light one, called Solar.

Lunar Mode: base colors use the blue color (hue 222°).

Contrast +4%:

cosmic-scheme

Contrast +2%:

cosmic-scheme

Contrast by default:

cosmic-scheme

Contrast -2%:

cosmic-scheme

Contrast -4%:

cosmic-scheme

Solar Mode: base colors use the orange color (hue 55°).

Solar mode is useful when the screen receives a high illumination or we have to code in a bright environment. Our eyes will not have to adapt the light sensibility every time we look at the screen.

Contrast +4%:

cosmic-scheme

Contrast +2%:

cosmic-scheme

Contrast by default:

cosmic-scheme

Contrast -2%:

cosmic-scheme

Contrast -4%:

cosmic-scheme

Code editors and IDEs

Themes

  • Cmus
  • Irssi
  • Mutt
  • Rofi
  • Tty
  • Vifm
  • Zsh

Installation

Cosmic color scheme for Vim and Neovim can be installed directly from the following repository: gerardbm/vim-cosmic.

For more specific information, read the following articles:

  1. Installation for terminals (URxvt, XTerm).
  2. Installation for code editors (Vim, Neovim).
  3. Installation for cli-tools (cmus, irssi, mutt, rofi, tty, vifm, zsh).

Font family

Cosmic is designed to look good with any kind of typography, as colors are distinguishable to any thickness.

About

A perceptually balanced color scheme based on Atomic and inspired by Solarized. It was designed using HSLuv and ΔE00 to ensure harmony and contrast across light and dark modes.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published