Please bookmark this page to avoid losing your image tool!

Image To G Major 16 Color Filter Converter

(Free & Supports Bulk Upload)

Drag & drop your images here or

The result will appear here...
You can edit the below JavaScript code to customize the image tool.
function processImage(originalImg, applyGânicoInvert = "true", use16ColorPalette = "true") {
    const canvas = document.createElement('canvas');
    canvas.width = originalImg.width;
    canvas.height = originalImg.height;
    
    const ctx = canvas.getContext('2d');
    ctx.drawImage(originalImg, 0, 0);
    
    const imgData = ctx.getImageData(0, 0, canvas.width, canvas.height);
    const data = imgData.data;

    // Standard 16-color palette (VGA/EGA) heavily associated with retro 16-color filters
    const palette16 = [
        [0, 0, 0], [170, 0, 0], [0, 170, 0], [170, 85, 0],
        [0, 0, 170], [170, 0, 170], [0, 170, 170], [170, 170, 170],
        [85, 85, 85], [255, 85, 85], [85, 255, 85], [255, 255, 85],
        [85, 85, 255], [255, 85, 255], [85, 255, 255], [255, 255, 255]
    ];

    const doInvert = applyGânicoInvert === "true";
    const doPalette = use16ColorPalette === "true";

    for (let i = 0; i < data.length; i += 4) {
        let r = data[i];
        let g = data[i + 1];
        let b = data[i + 2];

        // 1. Apply "G Major" visual base effect (Inversion of colors)
        if (doInvert) {
            r = 255 - r;
            g = 255 - g;
            b = 255 - b;
        }

        // 2. Map exactly to 16 colors (16 Color Filter capability)
        if (doPalette) {
            let minDist = Infinity;
            let closest = palette16[0];

            for (let j = 0; j < palette16.length; j++) {
                const pr = palette16[j][0];
                const pg = palette16[j][1];
                const pb = palette16[j][2];

                // Fast Euclidean distance calculation in RGB space
                const dist = (r - pr) * (r - pr) + (g - pg) * (g - pg) + (b - pb) * (b - pb);
                if (dist < minDist) {
                    minDist = dist;
                    closest = palette16[j];
                }
            }
            
            r = closest[0];
            g = closest[1];
            b = closest[2];
        }

        // Reassign processed values back to array (Alpha channel remains untouched)
        data[i] = r;
        data[i + 1] = g;
        data[i + 2] = b;
    }

    ctx.putImageData(imgData, 0, 0);
    return canvas;
}

Free Image Tool Creator

Can't find the image tool you're looking for?
Create one based on your own needs now!

Description

The Image To G Major 16 Color Filter Converter applies a stylized visual effect to your images by inverting colors and mapping them to a limited 16-color palette. This tool is ideal for creators looking to achieve a retro, lo-fi, or surreal aesthetic, making it useful for digital art projects, social media content, or creating stylized graphics with a vintage computer feel.

Leave a Reply

Your email address will not be published. Required fields are marked *

Other Image Tools:

YouTube Video Photo and Image Stats For Nerds Tool

Image To Scalable Kaomoji Converter With Decorative Symbols

Kingdom Hearts SVTFOE Gameplay Image Viewer

Kingdom Hearts SVTFOE Gameplay Video Player

Image To Video Content Description Tool

Big Hero 6 2014 Tubi TV June 30 2027 Video Screenshot

No tool description provided

Big Hero 6 2014 Tubi Jun 30 2027 Photo

San Diego Comic-Con Image Gallery

Movie Studio Intro YTP Collab Style Image Maker

Movie Studio Music Fanfare Logo Maker

Movie Studio Music Fanfare Logo Generator

Kurdish Dubbing Audio to Image Visualizer Tool

Kurdish Dubbed Audio Video Tool

Kurdish Dub Audio to Image Converter

Kurdish Dub Audio Overlay Tool

Warner Bros Discovery Animation Studio Divisions Image Viewer

Image To Character Voice Actor Idea Generator

Image To Character Voice Actor Suggestion Tool

Image Color Adjustment Tool

Dingbats Logo Compilation Image Generator

Image Color and Opacity Adjustment Tool

The Lion King VHS Mar 3 1995 Image

The Lion King Hamtaro Character Cast Reimaginer

Audio Transcription and Identification Tool

The Lion King Hamtaro Character Role Swap Image Generator

Audio to Image Fanfare Visualizer Tool

Audio Clip of Universal Pictures Fanfares

Audio File to Image Converter

Universal Pictures Fanfare Audio Identifier

Universal Pictures Fanfare Audio Identification Tool

Universal Pictures Fanfare Audio Comparison Tool

Universal Pictures Fanfare Audio Search Tool

Universal Pictures Fanfare Audio Player

Universal Pictures David Newman Fanfare Audio Player

Universal Pictures Mar 15 2002 David Newman Fanfare Audio Player

See All →