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

chronochrome

v2.0.1

Published

Circadian accent hues from clock time, season, and latitude — pure TypeScript, zero DOM

Readme

chronochrome

Circadian accent hues from clock time, season, and observer latitude.

Pure TypeScript — no DOM, no React, zero runtime deps.
Born as the Lightmotiv “living light” accent (code name light-hue); npm package chronochrome.

CI npm

Install

npm install chronochrome

Adapters

Core stays framework-free. For a 30-second drop-in:

| Host | Package | Fast path | | ---------------- | ------------------------------------------------------------------------------------------------------ | ------------------------------------- | | Tailwind v3 / v4 | @chronochrome/tailwind | start() + bg-accent | | Svelte 5 | @chronochrome/svelte | start() / $hue / <ChronoChrome> | | Bootstrap 5 | @chronochrome/bootstrap | start() + .btn-primary |

All adapters live in the chronochrome monorepo.

Quick start

import { sampleLightHue, applyCssVars, createLightHueTicker } from "chronochrome";

const snap = sampleLightHue({
  latitude: 57.63, // e.g. Yaroslavl
  timeZone: "Europe/Moscow",
  season: "auto", // auto | winter | mid | summer
  hourOverride: 18, // optional dial / demo
  includeArcs: true, // SVG sun/moon day chart
});

// browser
applyCssVars(document.documentElement, snap.cssVars);

const ticker = createLightHueTicker(
  (s) => {
    applyCssVars(document.documentElement, s.cssVars);
  },
  { latitude: 57.63, timeZone: "Europe/Moscow", intervalMs: 60_000 },
);

// later: ticker.stop();

What it computes

| Output | Source | | ------------------------------ | ------------------------------------------------------------------------------------------ | | Accent RGB / hex / hover / dim | Time-of-day keyframes (midnight → sunrise → zenith → sunset → dusk) | | Glow alpha / blur, ring alpha | Season shaping (winter soft, summer punchy) | | Solar altitude & day arc | Declination + hour angle at latitude | | Moon age, phase fill, arc | Synodic month from 2000-01-06 new moon epoch | | CSS vars | --accent-primary, --accent-primary-hover, --accent-primary-dim, plus --light-hue-* |

Brand accent ≠ status. Green/red stay for success/danger in the host design system.

API

sampleLightHue(opts?): LightHueSnapshot

interface LightHueOptions {
  at?: Date;
  hourOverride?: number; // 0–24
  timeZone?: string; // IANA, e.g. "Europe/Moscow"
  latitude?: number; // default 55.75
  longitude?: number; // degrees east; needed for hourMode "solar" (defaults to 0° — Greenwich)
  hourMode?: "clock" | "solar"; // default "clock", see "Anchoring the palette to the sun"
  season?: "auto" | "winter" | "mid" | "summer";
  includeArcs?: boolean;
  arcHeight?: number;
  locale?: string;
}

Also: lightHueCssVars, createLightHueTicker, solarDayEvents, zonedParts, lightAt, DAY_STOPS, …

Solar events and the golden hour

solarAltitude in the palette path is a design model: hour 12 is solar noon and longitude is ignored. That is invisible in an accent colour and wrong by up to half an hour in a time — in Yaroslavl (39.88°E, UTC+3) the meridian is at 45°E, so noon falls at 12:20 before the equation of time adds its own ±15 minutes.

Anything you would schedule against goes through the accurate path instead:

import { solarEvents, goldenHourWindows, currentOrNextGoldenHour } from "chronochrome";

const place = { latitude: 57.6261, longitude: 39.8845, timeZone: "Europe/Moscow" };

solarEvents({ ...place }); // sunrise / sunset / solarNoon of the local day
goldenHourWindows({ ...place }); // both windows of that day — the marks on an arc
currentOrNextGoldenHour({ ...place }); // the one running now, else the next

The golden hour is the sun between -4° and +6°, not a flat forty minutes after sunrise. currentOrNextGoldenHour rolls into tomorrow once this evening's has passed, and returns null through polar night.

Anchoring the palette to the sun

DAY_STOPS is keyed on hour: sunrise colour at 6.5, zenith at 12, sunset at 18. That holds around 50°N in spring and nowhere else — in Murmansk in late July the sun is up at 01:46 while the clock palette only reaches its sunrise stop at 06:30.

hourMode: "solar" stretches the palette's hour axis so the observer's real sunrise, solar noon and sunset land on the keyframes built for them:

sampleLightHue({ ...place, hourMode: "solar" });

Default stays "clock", so published behaviour is unchanged. snapshot.paletteHour shows which hour the palette was actually read at.

Pass longitude with "solar": without it the observer is placed on the Greenwich meridian, which in Moscow moves solar noon by about two and a half hours. Through polar day or polar night there is no sunrise or sunset to pin, so only solar noon anchors the axis — the palette is shifted, not stretched, and the night stops still come at night by the clock even under the midnight sun.

Ports

Two files are built for implementations in other languages:

| File | What it is | | -------------------- | ------------------------------------------------------------------ | | dist/palette.json | DAY_STOPS and season shaping as data — interpolate, don't retype | | vectors/solar.json | Reference solar values every port asserts against |

The vectors are the contract. A port that drifts fails a test instead of quietly running twenty minutes late. Regenerate with pnpm --filter chronochrome artifacts.

Time zones

sampleLightHue({
  at: new Date(),
  timeZone: "America/New_York",
  latitude: 40.71,
});

Moon age stays absolute (UTC). Latitude is explicit — pair zone + city lat yourself.

Demo

Live: https://chronohue.isamarin.xyz/

The sun/moon chart is @chronochrome/widget — same drawing as Lumina.

Location / timezone / lat·lon, 24h dial, sun·moon chart, UI kit on CSS vars. Source: apps/demo.

Development

This package lives in the chronochrome monorepo — scripts, the demo and the release process are described in its root README and PUBLISH.md. Regenerate the test vectors with pnpm --filter chronochrome artifacts.

License

MIT · isamarin × BLMK