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

@omi-io/color-datasets

v0.1.0

Published

Curated reference data: standard illuminants and tristimulus tables, RGB colorspace definitions, transfer-function pairs, and chromatic-adaptation transforms.

Downloads

79

Readme

@omi-io/color-datasets

Curated colorspace and illuminant data expressed as @omi-io/color-core types: RGB primaries and colorspace definitions (including published RGB→XYZ matrices where standards quote them), transfer-function pairs, whitepoints and related CIE tables, and chromatic-adaptation transforms.

This package holds datasets only. Conversion pipelines and graph routing live in @omi-io/color-convert; math primitives and shared interfaces live in @omi-io/color-core.

Installation

yarn add @omi-io/color-datasets
npm install @omi-io/color-datasets

The package ships dual ESM / CJS bundles plus .d.ts types and is marked sideEffects: false.

Module layout

Public symbols are re-exported from the package root. The same symbols are available from topic subpaths (@omi-io/color-datasets/<topic>), which can help bundlers split work by area. Source is grouped by topic:

| Area | Exports (high level) | | ----------------------- | ------------------------------------------------------------------------------------- | | rgb-colorspaces/ | RGB_COLORSPACES, RGB_PRIMARIES, PUBLISHED_RGB_TO_XYZ_MATRICES, matrix derivation helpers | | transfer-functions/ | TRANSFER_FUNCTIONS, individual TransferFunctionPair instances, gamma helpers | | illuminants/ | WHITEPOINTS, getWhitepoint, TRISTIMULUS_VALUES, CHROMATICITY_COORDINATES | | chromatic-adaptation/ | CHROMATIC_ADAPTATION_TRANSFORMS |

Quick tour

RGB colorspaces

RGB_COLORSPACES maps each RGBColorspaceId to a full RGBColorspace: primaries, whitepoint, observer, RGB↔XYZ matrices, transfer pair, and whether the NPM was derived vs taken from a published matrix.

import { RGB_COLORSPACES } from "@omi-io/color-datasets";

const srgb = RGB_COLORSPACES.sRGB;
srgb.matrixRGBToXYZ;
srgb.transfer.encode; // sRGB OETF

Use deriveRGBColorspaceMatrices / normalisedPrimaryMatrix when you need matrices from primaries and xy whitepoint outside the shipped catalog.

Transfer functions

import {
    TRANSFER_FUNCTIONS,
    SRGB_TRANSFER_FUNCTION,
    createGammaTransferFunctionPair,
} from "@omi-io/color-datasets";

TRANSFER_FUNCTIONS.sRGB === SRGB_TRANSFER_FUNCTION;

Shipped IDs in TRANSFER_FUNCTIONS: linear, gamma-2.2, gamma-2.6, Adobe RGB, sRGB, Rec.709, Rec.2020.

Illuminants

import {
    WHITEPOINTS,
    getWhitepoint,
    TRISTIMULUS_VALUES,
    CHROMATICITY_COORDINATES,
} from "@omi-io/color-datasets";

getWhitepoint("D65");

Chromatic adaptation

import { CHROMATIC_ADAPTATION_TRANSFORMS } from "@omi-io/color-datasets";

CHROMATIC_ADAPTATION_TRANSFORMS["Von Kries"].matrixXYZToCone;

Subpath imports

Each row in the table above maps to a published export; imports are equivalent to the root package aside from the module specifier.

RGB colorspaces

import { RGB_COLORSPACES } from "@omi-io/color-datasets/rgb-colorspaces";

const srgb = RGB_COLORSPACES.sRGB;

Transfer functions

import {
    TRANSFER_FUNCTIONS,
    SRGB_TRANSFER_FUNCTION,
} from "@omi-io/color-datasets/transfer-functions";

TRANSFER_FUNCTIONS.sRGB === SRGB_TRANSFER_FUNCTION;

Illuminants

import {
    WHITEPOINTS,
    getWhitepoint,
    TRISTIMULUS_VALUES,
    CHROMATICITY_COORDINATES,
} from "@omi-io/color-datasets/illuminants";

getWhitepoint("D65");

Chromatic adaptation

import { CHROMATIC_ADAPTATION_TRANSFORMS } from "@omi-io/color-datasets/chromatic-adaptation";

CHROMATIC_ADAPTATION_TRANSFORMS["Von Kries"].matrixXYZToCone;

Scripts

From this package directory:

yarn build   # clean + bundle + emit .d.ts + path aliases
yarn test    # jest
yarn lint    # eslint ./src
yarn clean   # remove dist/