Please bookmark this page to avoid losing your image tool!

Image Yellow Filter Black And White Effect Tool

(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, blueReductionFactor = 0.5) {
    // Ensure blueReductionFactor is within the valid range [0, 1]
    // 0 means no blue reduction (standard black and white)
    // 1 means full blue reduction (strong yellow filter effect)
    const clampedBlueReductionFactor = Math.max(0, Math.min(1, blueReductionFactor));

    const canvas = document.createElement('canvas');
    const ctx = canvas.getContext('2d', { willReadFrequently: true }); // Optimized for frequent reads

    // Set canvas dimensions to the image's natural dimensions
    canvas.width = originalImg.naturalWidth || originalImg.width;
    canvas.height = originalImg.naturalHeight || originalImg.height;

    // Draw the original image onto the canvas
    ctx.drawImage(originalImg, 0, 0, canvas.width, canvas.height);

    // Get the pixel data from the canvas
    const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);
    const data = imageData.data;

    // Iterate over each pixel (RGBA)
    for (let i = 0; i < data.length; i += 4) {
        const r = data[i];
        const g = data[i + 1];
        const b = data[i + 2];
        // Alpha channel data[i + 3] is preserved

        // Apply the "yellow filter" by reducing the blue component's contribution
        // This simulates a physical yellow filter which absorbs blue light.
        const modifiedB = b * (1 - clampedBlueReductionFactor);

        // Convert the modified RGB to grayscale using luminance formula (Rec. 709 standard)
        // R, G components are taken as is, B component is the modified one.
        // This makes blue areas darker and red/yellow areas relatively lighter.
        const gray = 0.2126 * r + 0.7152 * g + 0.0722 * modifiedB;

        // Set the pixel to the new grayscale value
        data[i] = gray;     // Red channel
        data[i + 1] = gray; // Green channel
        data[i + 2] = gray; // Blue channel
        // data[i + 3] (alpha) remains unchanged
    }

    // Put the modified pixel data back onto the canvas
    ctx.putImageData(imageData, 0, 0);

    // Return the canvas element
    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 Yellow Filter Black And White Effect Tool allows users to apply a unique effect to their images by reducing the blue component of the color, simulating a yellow filter. This tool can convert images into a black and white format while emphasizing warmer tones. It is particularly useful for photography enthusiasts looking to create artistic monochrome images or add a vintage touch. Use cases include enhancing portraits, achieving a retro aesthetic, or experimenting with color dynamics in digital art.

Leave a Reply

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

Other Image Tools:

Image Expired Film Filter Effect Tool

Image Circular Polarizer Filter Effect Tool

Image Lomography Purple Filter Effect Tool

Image Split Field Filter Effect Tool

Image Soft Focus Filter Effect Tool

Image Medium Format Film Filter Effect

Image Wide-Angle Lens Perspective Filter Effect Tool

Olympus OM-1 Photo Filter Effect Tool

Image Fujifilm Velvia Filter Effect Tool

Image Lensbaby Selective Focus Filter Effect Tool

Image Color Temperature Blue Filter Effect Tool

Image UV Filter Effect Tool

Image Red Filter Black And White Effect Tool

Image Redscale Film Filter Effect

Image Cinestill 800T Filter Effect Tool

Image Glimmer Glass Filter Effect Tool

Image Star Filter Effect Tool

Image Kodak Portra 400 Film Filter Effect

Image Fujifilm Superia Filter Effect Tool

Image Tilt-Shift Lens Filter Effect Tool

Image Graduated Neutral Density Filter Effect Tool

Image Diana Camera Filter Effect Tool

Image 35mm Film Camera Filter Effect Tool

Image Pro-Mist Filter Effect Application

Image Cross-Processed Slide Film Filter Effect Application

Image Pull-Processed Film Filter Effect Tool

Image Infrared Filter Effect Application

Image Ilford Delta 3200 Filter Effect Application

Image Cooling Filter Effect Tool

Image Fujifilm Instax Filter Effect Creator

Image Black And White Effect With Orange Filter

Image Kodak Tri-X Filter Effect Tool

Image Ilford HP5 Plus Filter Effect Application

Image Orchestra Seating Filter Effect

Image Braille Text Filter Effect

Image Missile Trajectory Filter Effect Tool

See All →