noisier
v1.0.1
Published
Per-pixel HSV jittering tool that adds subtle color noise to PNGs, ideal for Minecraft textures
Downloads
272
Maintainers
Readme
noisier
A Node.js CLI tool that takes flat PNG textures and makes them more interesting by applying per-pixel HSV jittering (randomized hue-saturation noise injection).
Built for Minecraft resource pack creators and other pixel artists who want gritty, weathered-looking textures without hand-painting every pixel.

How it works
Every pixel is processed independently:
- RGB is converted to HSV (hue, saturation, value).
- A small random offset is added to the hue and saturation:
H_new = (H_old + ΔH) mod 360°, whereΔH ~ U(-V_H, +V_H)S_new = clamp(S_old + ΔS, 0, 1), whereΔS ~ U(-V_S, +V_S)
- The result is converted back to RGB and written out.
Brightness/value is left untouched, so the texture keeps its original shading. Fully transparent pixels are skipped, which keeps item sprites and cutout textures intact.
Because hue wraps around the color wheel and saturation is clamped, the effect stays subtle: pixels shift to nearby colors rather than jumping to random ones.
Installation
npm install -g noisierOr run it directly without installing:
npx noisier <input.png> <output.png>Usage
noisier <input.png> <output.png> [hueVarianceDeg] [satVariance]| Argument | Description | Default |
| ---------------- | --------------------------------------------- | ------- |
| input.png | Source image | — |
| output.png | Destination image | — |
| hueVarianceDeg | Max random hue shift in degrees (±) | 8 |
| satVariance | Max random saturation shift, 0.0–1.0 (±) | 0.08 |
Examples
Default subtle jitter:
npx noisier stone.png stone_noisy.pngStronger weathering effect:
npx noisier dirt.png dirt_noisy.png 12 0.15Nearly monochrome texture that just needs a hint of life:
npx noisier gravel.png gravel_noisy.png 4 0.05Tuning tips
- Start small. For 16×16 block textures, the defaults (
8°, 0.08) are usually enough. Large values produce confetti, not grime. - Hue variance shifts the color itself (brown dirt gets reddish/yellowish patches).
- Saturation variance shifts vividness (patches look more faded or more rich) — great for a dried-out or mossy feel.
- Run the tool multiple times with different seeds of randomness and pick the best result; every run is unique.
Batch processing a resource pack
for f in resource_packs/my_pack/textures/blocks/*.png; do
npx noisier "$f" "out/$(basename "$f")" 8 0.08
doneProgrammatic use
import { jitter } from "noisier";
import fs from "node:fs";
import { PNG } from "pngjs";
const png = PNG.sync.read(fs.readFileSync("stone.png"));
jitter(png, 8, 0.08); // mutates the png in place
fs.writeFileSync("stone_noisy.png", PNG.sync.write(png));Requirements
- Node.js 24+
- Single dependency:
pngjs(pure JavaScript, no native builds)
Testing
npm testRuns the built-in node:test suite in test/, which covers RGB↔HSV roundtrips, jitter invariants (alpha preservation, transparent-pixel skipping, variance bounds, value stability), and end-to-end CLI runs.
License
ISC
