Skip to content

What is Spectrum?

Welcome to Spectrum, a lightweight JavaScript / TypeScript library designed to simplify color manipulation and conversion tasks within the RGB, HSL, and HEX color spaces.

It may be not the most extensive library out there, but it’s precisely what you need for common color-related tasks. Whether you want to blend two colors, get a darker version of your color, or the saturation of a HEX color value. Spectrum is your finely-tuned instrument for simplifying these processes.

Key Features

  • Color values conversion: convert color values within HEX, HSL, and RGB color spaces.
  • Effortless color mixing: combine two colors with ease.
  • Color paramenters adjustments: lightness, saturation, opacity, and more.
  • Color Inversion: get a negative color of the given one.
  • Color Palette Generation: create a color palette with varying lightness levels, all derived from a single base color.

Spectrum is here to make your color-related tasks more efficient and straightforward. In this documentation, we’ll explore how to leverage its capabilities. Let’s dive in!