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

@genart-dev/plugin-color-adjust

v0.1.0

Published

Color adjustment design layer plugin for genart.dev

Readme

@genart-dev/plugin-color-adjust

Color adjustment design layer plugin for genart.dev — non-destructive HSL, Levels, and Curves adjustment layers with per-channel control. Includes MCP tools for AI-agent control.

Part of genart.dev — a generative art platform with an MCP server, desktop app, and IDE extensions.

Examples

HSL adjustments

Hue shifting, desaturation, lightness, and hue-targeted adjustments applied to a rainbow gradient.

Install

npm install @genart-dev/plugin-color-adjust

Usage

import colorAdjustPlugin from "@genart-dev/plugin-color-adjust";
import { createDefaultRegistry } from "@genart-dev/core";

const registry = createDefaultRegistry();
registry.registerPlugin(colorAdjustPlugin);

// Or access individual exports
import {
  hslLayerType,
  levelsLayerType,
  curvesLayerType,
  colorAdjustMcpTools,
  buildLevelsLut,
  buildCurvesLut,
  computeHistogram,
} from "@genart-dev/plugin-color-adjust";

Layer Types

HSL Adjustment (adjust:hsl)

Pixel-level hue, saturation, and lightness adjustment with optional hue-range targeting and smooth falloff.

| Property | Type | Default | Description | |----------|------|---------|-------------| | hue | number | 0 | Hue shift (−180–180) | | saturation | number | 0 | Saturation shift (−100–100) | | lightness | number | 0 | Lightness shift (−100–100) | | targetHue | number | -1 | Target hue angle (−1 = all colors) | | targetRange | number | 30 | Target range in degrees (0–180) | | targetFalloff | number | 15 | Falloff width in degrees (0–90) |

Levels (adjust:levels)

Input/output range remapping with gamma correction, per-channel or RGB.

| Property | Type | Default | Description | |----------|------|---------|-------------| | inputBlack | number | 0 | Input black point (0–255) | | inputWhite | number | 255 | Input white point (0–255) | | gamma | number | 1.0 | Gamma (0.1–10) | | outputBlack | number | 0 | Output black point (0–255) | | outputWhite | number | 255 | Output white point (0–255) | | channel | select | "rgb" | Channel: rgb, r, g, b |

Curves (adjust:curves)

Arbitrary tone curve via control points, using monotone cubic (Fritsch-Carlson) or linear interpolation.

| Property | Type | Default | Description | |----------|------|---------|-------------| | points | string (JSON) | "[[0,0],[255,255]]" | Control points as [input, output][] | | channel | select | "rgb" | Channel: rgb, r, g, b | | interpolation | select | "monotone-cubic" | monotone-cubic or linear |

MCP Tools (4)

| Tool | Description | |------|-------------| | adjust_hsl | Create or update an HSL adjustment layer | | adjust_levels | Create or update a levels adjustment layer | | adjust_curves | Create or update a curves adjustment layer | | auto_levels | Auto-normalize tonal range via histogram analysis |

API Reference

buildLevelsLut(inputBlack, inputWhite, gamma, outputBlack, outputWhite)

Returns a Uint8Array (256 entries) lookup table for levels adjustment.

buildCurvesLut(points)

Returns a Uint8Array LUT from monotone cubic interpolation of control points.

computeHistogram(data, totalPixels)

Computes per-channel and luminosity histograms with auto-detected black/white points.

Related Packages

| Package | Purpose | |---------|---------| | @genart-dev/core | Plugin host, layer system (dependency) | | @genart-dev/mcp-server | MCP server that surfaces plugin tools to AI agents |

Support

Questions, bugs, or feedback — [email protected] or open an issue.

License

MIT