npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@leoneljdias/ltc-color-palettes-js

v1.0.0

Published

JavaScript port of the ltc R color-palette package by Loukas Theodosiou. Provides art-inspired color palettes with adjust, desaturate, CVD simulation, and visualization functions.

Downloads

21

Readme

ltc-color-palettes-js

npm version npm downloads License: MIT

A JavaScript port of loukesio/ltc-color-palettes, originally written in R, reimplemented in JavaScript with the same palettes and equivalent functionality. All palette designs and original artwork credit: Loukas Theodosiou.

📖 Website & interactive palette explorer: https://leoneljdias.github.io/ltc-color-palettes-js/demo/

Install

npm install @leoneljdias/ltc-color-palettes-js

Usage

import { ltc, listPalettes, adjustLtc, desaturateLtc, ltcCvd, plotLtc, bird } from "@leoneljdias/ltc-color-palettes-js";

// List all palettes
console.log(listPalettes());
// ["paloma", "maya", "dora", "ploen", "olga", "mterese", ...]

// Choose a palette
const alger = ltc("alger");
console.log(alger);
// ["#000000", "#1A5B5B", "#ACC8BE", "#F4AB5C", "#D1422F"]

// Continuous interpolation
const heatmap = ltc("heatmap0", 20, "continuous");

// Adjust — darken (-) or lighten (+)
const darker = adjustLtc("maya", -30);
const lighter = adjustLtc("maya", 30);

// Desaturate
const muted = desaturateLtc("luminaries", 0.6);

// Colour-vision deficiency simulation
const cvd = ltcCvd("expevo", 0.6);
// { normal: [...], deuteranopia: [...], protanopia: [...], tritanopia: [...] }

// Render palette as SVG
const svg = plotLtc(ltc("alger"));

// Bird visualization (requires >= 5 colors)
const birdSvg = bird(ltc("pantone23"));

// In a browser, render to a DOM element:
// plotLtc(ltc("alger"), "#palette-container");
// bird(ltc("pantone23"), document.getElementById("bird"));

Differences from the original R package

  • Zero production dependencies. All color conversions (RGB↔HSL, CVD simulation, interpolation) are implemented in pure JS.
  • The plot(), bird(), print() and ltc_cvd() R functions produced ggplot2 objects. Their JS equivalents (plotLtc, bird, ltcCvd) return SVG strings (usable in Node or browser) rather than ggplot2 objects.
  • The palette data and all hex values are identical to the R package version 0.4.0.
  • This is not affiliated with the original author. It is a reimplementation in JavaScript.

API

| JS function | R equivalent | Description | |---|---|---| | ltc(name, n, type) | ltc() | Get palette colors (discrete, continuous, or diverging) | | listPalettes() | names(palettes) | List all palette names | | plotLtc(palette, target?) | plot() | Generate SVG bar of colors | | bird(palette, target?) | bird() | Generate SVG bird visualization | | adjustLtc(palette, amount, which?) | adjust_ltc() | Darken/lighten colors | | customAdjustLtc(palette, amounts) | custom_adjust_ltc() | Individual per-color adjustment | | desaturateLtc(palette, amount, which?) | desaturate_ltc() | Reduce saturation | | ltcCvd(name, severity) | ltc_cvd() | Simulate color-vision deficiency |

Palettes

| Name | Colors | Inspiration | |---|---|---| | paloma | 5 | Daughter of Francoise Gilot and Pablo Picasso | | maya | 5 | Daughter of Marie-Therese Walter | | dora | 5 | French photographer, painter, and poet | | ploen | 5 | A village in Northern Germany | | olga | 5 | Russian ballet dancer | | mterese | 5 | Marie-Therese Walter | | gaby | 5 | French dancer | | franscoise | 5 | French painter | | fernande | 4 | French model and artist | | sylvie | 5 | French artist and model | | expevo | 6 | Biology palette | | minou | 6 | Picasso's cat | | kiss | 5 | The Kiss (Picasso, 1925) | | hat | 10 | Woman in Hat (Picasso, 1937) | | reading | 8 | Two Girls Reading (Picasso, 1934) | | alger | 5 | Les femmes d'Alger (Picasso, 1955) | | trio1–4 | 3 each | 3-variable discrete palettes | | heatmap0 | 9 | Diverging palette for heatmaps | | heatmap1–3 | 5 each | Diverging palettes | | pantone23 | 5 | Pantone Soft Chaos 2023 | | remains | 4 | The Remains of the Day | | midnight | 4 | Midnight's Children | | lincoln | 6 | Lincoln in the Bardo | | luminaries | 6 | The Luminaries | | seafarer | 5 | The Old Man and the Sea | | shuggie | 5 | Shuggie Bain | | casa_natal | 9 | Picasso's birthplace |

Contributions

This is a fork/port of the original R package by Loukas Theodosiou ([email protected]). For the palettes he drew inspiration from the drawings and life of Pablo Picasso as well as from several books.

Issues and pull requests are welcome on GitHub.

Roadmap

Version 0.4.0 mirrors the CRAN version of the original R package.

License

MIT — see LICENSE. Original palette designs and artwork credit: Loukas Theodosiou.