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

@rdnr/retrofy

v0.1.0

Published

Convert images into retro pixel-art style (8-bit / old Nintendo aesthetic)

Readme

✨ retrofy

Transform your photos into nostalgic pixel-art masterpieces with authentic retro gaming palettes — straight from the NES, Game Boy, CGA, and PICO-8 era.

Ever want to turn a selfie into an 8-bit character? Or make your vacation photos look like classic Nintendo box art? That's what retrofy does — it's your time machine for digital images.

Get Started

npm install @rdnr/retrofy

Quick Example

In Node.js:

import { retrofy } from '@rdnr/retrofy'

const result = await retrofy('photo.jpg', {
  pixelSize: 8,           // Chunky 8×8 blocks
  palette: 'nes',         // Use authentic NES colors
  dithering: 'floyd-steinberg', // Smooth color transitions
  output: 'retro.png',    // Save the result
})

Via CLI:

retrofy photo.jpg --pixel-size 8 --palette nes --dithering floyd-steinberg --output retro.png

Supported Formats

retrofy uses sharp under the hood.

| | Formats | |---|---| | Input | JPEG, PNG, WebP, AVIF, TIFF, GIF, SVG, HEIC/HEIF | | Output | PNG (always) |

Configuration

Fine-tune your retro transformation with these options:

| Option | Type | Default | What it does | |---------------|-------------------------------------|---------|----------------------------------------------------| | pixelSize | number | 8 | Size of each pixel block (bigger = chunkier) | | palette | 'nes' \| 'gameboy' \| 'cga' \| 'pico8' \| RGB[] | none | Which color set to use (or define your own) | | dithering | 'none' \| 'floyd-steinberg' \| 'bayer' | 'none' | How to blend colors smoothly | | colorDepth | 8 \| 16 \| 32 | none | How many colors to extract from your image | | output | string | none | Where to save the retro image | | scale | number | 1 | Make it bigger without blurring (2× = double size) |

Pick Your Era

Choose a palette that brings back memories — each one is authentic hardware:

NES — 64 colors
The original 1983 Nintendo Entertainment System's PPU palette. Rich variety perfect for detailed pixel art.

From deep black to burnt orange—and 56 more authentic colors in between.

Game Boy — 4 colors
That iconic monochrome green screen from 1989. Nostalgic, minimal, unforgettable.

CGA — 16 colors
The legendary IBM PCjr (1984) color palette. Pure 80s computing vibes.

PICO-8 — 16 colors
Modern retro: the PICO-8 fantasy console's beloved 16-color set. Indie game darling.

How It Works

Pixelation — Imagine dividing your image into a grid of blocks. retrofy averages all the colors in each block and paints the whole block with that single color. Bigger blocks = chunkier look. It's like viewing your image through a low-res security camera.

Color Quantization — Real hardware had limited colors. retrofy uses the median-cut algorithm to extract a balanced palette from your actual image — finding the most important colors and bundling similar ones together. This keeps your image looking good while respecting the palette limits.

Dithering — When you have fewer colors than you need, dithering tricks the eye into seeing more colors through patterns. Floyd-Steinberg spreads color errors to neighboring pixels for a smooth, natural look. Bayer creates a regular crosshatch pattern — more stylized, more "retro console."