/egal

Uniform color palettes.

Primary LanguageTypeScriptMIT LicenseMIT

Shows an illustrated sun in light mode and a moon with stars in dark mode.

Raison d'être

There are many great color systems out there: from classic spot color systems like PANTONE, RAL, or ANPA, to widespread digital systems like X11 and web colors, to those found in specialized design systems like Adobe Spectrum, Apple HIG, Microsoft FluentUI, TailwindCSS, IBM Carbon, VMware Clarity, Google Material, Github Primer, etc. So, why another color system?

The answer aligns mostly with the motivation behind Google's HCT color space: perceptual uniformity. In particular, it's rare for a color system to be truly uniform across hues in perceived brightness or saturation, let alone both. The HCT color space alleviates this issue, but as far as I'm aware, there is no simple way to generate a comprehensive color palette with HCT that is perceptually uniform in both brightness and saturation. Google's material color utilities provide some built-in ways to generate palettes, but are limited to tonal uniformity, and are relatively inflexible.

What this project aims to do is to build on Google's material color utilities to provide a simple, flexible, and comprehensive way to generate color palettes that are perceptually uniform in both brightness and saturation.

Usage

TODO: Expand this section.

Installation

git clone https://github.com/nvlang/egal.git
cd egal
pnpm install # or npm install or yarn install

Example

tsx src/generate.ts

Background information

TODO: Expand this section.

Shows an illustrated sun in light mode and a moon with stars in dark mode. Tonal palettes of 240° hue by ambient L*.

Other Resources

Software

Articles

Discussions

  • HCT Color Space: Hacker News discussion on the HCT color space, involving its creator.