User Rating 0.0
Total Usage 0 times
Drop image here or click to browse PNG, JPG, GIF, BMP, WebP • Max 20 MB
Original
C64 Output
Upload or drop an image to begin
Processing...
Is this tool helpful?

Your feedback helps us improve.

About

The Commodore 64's VIC-II graphics chip enforces constraints that no modern image editor replicates correctly. In hi-res mode (320×200 pixels), each 8×8 character cell permits exactly 2 colors from a fixed 16-color palette. Multicolor mode doubles horizontal pixel width to 160×200, allowing 4 colors per 4×8 cell - but one must be the shared background color. Naively reducing an image to 16 colors produces color clash artifacts at cell boundaries. This tool performs per-cell constrained quantization using CIEDE2000 perceptual color distance in CIE LAB space, then applies optional Floyd-Steinberg or ordered dithering within those constraints. The result is an image that would display correctly on real hardware.

Exported files use authentic binary formats: Koala Painter (10003 bytes at load address $6000) for multicolor, Art Studio (9009 bytes at $2000) for hi-res, or a standalone PRG with a 6502 machine code viewer stub. The conversion approximates results - CRT phosphor behavior and PAL signal artifacts are not simulated. For best results, use source images with strong contrast and limited color gradients. Fine text and thin lines below 4 pixels will be lost in multicolor mode due to the doubled pixel width.

commodore 64 c64 retro graphics pixel art image converter vic-ii 8-bit dithering koala painter art studio

Formulas

Color matching uses the CIEDE2000 perceptual distance formula in CIE LAB space. Each pixel's RGB is converted to LAB, then compared against all 16 palette entries.

ΔE*00 = ΔL′2SL2 + ΔC′2SC2 + ΔH′2SH2 + RT ΔC′SC ΔH′SH

Where ΔL′ is the lightness difference, ΔC′ is the chroma difference, ΔH′ is the hue difference, SL, SC, SH are weighting functions, and RT is the rotation term correcting for blue region interaction between chroma and hue.

Floyd-Steinberg error diffusion distributes quantization error to neighboring pixels:

e = pixeloriginal pixelquantized
pixel(x+1, y) += e × 716
pixel(x1, y+1) += e × 316
pixel(x, y+1) += e × 14
pixel(x+1, y+1) += e × 116

Multicolor mode cell constraint: each 4×8 pixel cell selects 3 unique colors plus 1 shared background color (index stored in VIC-II register $D021). The background color is determined globally by frequency analysis across all cells.

Reference Data

IndexColor NameHex (Pepto)RGBLuminance
0Black#0000000, 0, 00
1White#FFFFFF255, 255, 255255
2Red#68372B104, 55, 4368
3Cyan#70A4B2112, 164, 178155
4Purple#6F3D86111, 61, 13481
5Green#588D4388, 141, 67114
6Blue#35287953, 40, 12150
7Yellow#B8C76F184, 199, 111186
8Orange#6F4F25111, 79, 3779
9Brown#43390067, 57, 051
10Light Red#9A6759154, 103, 89110
11Dark Grey#44444468, 68, 6868
12Grey#6C6C6C108, 108, 108108
13Light Green#9AD284154, 210, 132185
14Light Blue#6C5EB5108, 94, 181105
15Light Grey#959595149, 149, 149149

Frequently Asked Questions

The VIC-II chip enforces strict per-cell color limits. In hi-res mode, each 8×8 pixel cell can only contain 2 of the 16 available colors. When a source image region spanning one cell contains more than 2 distinct color clusters, the converter must discard the least-represented colors, causing visible banding. Multicolor mode allows 4 colors per cell but at half horizontal resolution. Reducing contrast in the source image or pre-processing with blur can minimize boundary artifacts.
Psychedelia mode adds weighted randomness to the per-cell color selection process. Instead of always choosing the two (or four) colors with the lowest total CIEDE2000 error, it introduces a probability factor that can select perceptually close but different palette entries. This breaks up monotonous regions and produces more visually varied results at the cost of strict color accuracy. The effect is strongest in areas where multiple palette colors have similar perceptual distances to the source pixels.
Koala Painter format stores multicolor bitmap data: 8000 bytes of bitmap, 1000 bytes of screen RAM (two colors per cell in upper/lower nybbles), 1000 bytes of color RAM (third cell color), 1 byte for background color, plus a 2-byte load address ($6000). Total: 10003 bytes. Art Studio format stores hi-res bitmap data: 8000 bytes of bitmap and 1000 bytes of screen RAM, loaded at $2000. Total: 9009 bytes. The PRG format wraps either with a 6502 machine code stub that configures VIC-II registers and enters an infinite loop displaying the image.
Human color perception is non-linear. Two colors that are numerically close in RGB space (e.g., dark blues) may appear very different, while two numerically distant colors (e.g., yellows) may appear similar. CIE LAB space models perceptual uniformity, and CIEDE2000 adds corrections for lightness, chroma, and hue weighting plus a rotation term for the problematic blue region. For C64 conversion, this means the tool picks palette colors that look correct to human eyes rather than colors that are mathematically nearest in an arbitrary color cube.
Yes. The PRG export includes a standard 2-byte load address header followed by 6502 machine code that sets VIC-II registers ($D011, $D016, $D018, $DD00) to bitmap mode, copies color data to screen RAM ($0400) and color RAM ($D800), then enters an infinite loop. Load with LOAD"FILE",8,1 and SYS to the start address. The file also runs in VICE and other accurate C64 emulators. Note: the viewer stub is minimal and does not handle interrupts or restore the system state.
Floyd-Steinberg is error-diffusion: quantization error from each pixel propagates to neighbors, producing organic-looking noise patterns but potentially causing directional artifacts in uniform regions. Bayer ordered dithering uses a fixed 4×4 threshold matrix to decide color assignment, producing a regular cross-hatch pattern. On the C64, ordered dithering often looks cleaner because the regular pattern aligns well with the character cell grid. Floyd-Steinberg can produce smoother gradients but may create visible serpentine patterns due to the alternating scan direction.