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

@mindpowered/colorconverter

v0.0.6

Published

Converter to convert between various color systems such as RGB, CIELAB, CMYK, HEX, RGB, and XYZ

Downloads

5

Readme

colorconverter

Converter to convert between various color systems such as RGB, CIELAB, CMYK, HEX, RGB, and XYZ

Build Status

Contents

Source Code and Documentation

About

Defining a color is difficult. The first challenge is finding a way to describe a color. One way is to describe color based on constituent colors. We can describe constituent colors by adding them, like in RGB, or subtracting them, like in CMYK. Gamut is the range of all colors that are representable in a color system. RGB trades a limited gamut for performance. LAB trades performance for the full gamut of visible colors. CMYK represents the gamut used in color printing.

The second challenge to defining a color is that it depends on the observer. Viewing the same color will look different when:

  • printed on paper or displayed on a screen
  • seen in daylight or under fluorescent lighting
  • positioned at a close or far distance Standard references such as the Pantone Matching System refer to specific colors. We lose information when converting from a reference color to a color system. Printing or rendering an RGB or CMYK color equivalent to a reference color may not match. We can avoid information loss during conversion by using an unlimited gamut such as LAB. We must also take into account the effect of the observer and illumination.

This package aims to provide tools to perform:

  • Color conversion between color systems
  • A way of searching for similar standardized reference colors

Requirements

  • ES6
  • npm

Third-party dependencies may have additional requirements.

Installation

npm

You can retrieve the colorconverter package using npm https://www.npmjs.com/. After initializing your packages.json file in your project’s directory with npm init, you can install the colorconverter package with

npm i @mindpowered/colorconverter --save

hint: the --save option will add the newly installed dependency in your packages.json file.

package.json

You can also add the package directly to your packages.json file.

...

Usage


let mpccc = require('@mindpowered/colorconverter');
const {ColorConverter} = mpccc;

let cc = new ColorConverter();
let colors = cc.FromHEX("#336699");

Support

We are here to support using this package. If it doesn't do what you're looking for, isn't working, or you just need help, please Contact us.

There is also a public Issue Tracker available for this package.

Licensing

This package is released under the MIT License.