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 🙏

© 2024 – Pkg Stats / Ryan Hefner

color-cam16

v0.0.12

Published

Perceptual Color Space and Language based on the CAM16 Uniform Color Space

Downloads

5

Readme

color-cam16

Perceptual Color Space and Language based on the CAM16 Uniform Color Space

Defining and Manipulating Colors

color-cam16 is a TypeScript library for defining and manipulating colors. Generate color sequences. Define color relationships. Determine color differences. Find analogous and complimentary colors. Ensure color contrast. Match real world colors.

The library uses a uniform color space based on human perception and human semantics. You can define a set of colors by their relationships in plain text. Define colors as warmer, cooler, lighter, darker, stronger, weaker, analogous, triadic, or complimentary. Declare how many steps between colors to form color sequences. The library will parse the color description and generate a set of colors.

Color Language

parse_colors(text: string): CAM16u[]

require { parse_colors } import 'color-cam16'

color_gradient = parse_colors('1A5 to 9Z5 in 5 steps')
warm_colors = parse_colors('1A5 to 9Z5 in 15 steps')
cool_colors = parse_colors('9a5 to 1z5 in 15 steps')
rainbow = parse_colors('rainbow in 26 steps')
hue_A = parse_colors('0A0 lighter to 100 in 11 steps, stronger to 50 in 10 steps').filter(x => x.inGamut)

Color gradient

Warm colors

Cool Colors

Rainbow Colors

Hue A

  • adjust_color
{
    "Ju":70,
    "Mu":16.66,
    "Hu":32
    "inGamut":true,
    "hex":"#d8a488",
    "hexMu":16.666666666666664,
    "hexLabel1":"7N3",
    "hexLabel2":"70N33",
}

Color Space Transforms

  • JuMuHu_to_color
  • label_to_color

Color Space Analysis

  • delta_e
  • find_closest_color
  • find_strongest_color
  • find_strongest_Mu
  • cluster_colors

Color Names

  • label_to_name
  • name_to_color
  • find_closet_names