White colour on project

Hi everyone, Sorry for my English. I have a problem with a white colour on print. We have a industrial ink printer CMYK. We print on cardboard boxes. Cardboard boxes are brown so we couldn't print on white colour. Very often our clients while making projects in designer using white colour (because background is brown) but we couldn't print it. Can we blocked white colour in designer that nobody can't use it on projekt or another solutions is convert white colour to transparent. Unless is another solutions to fix my problem. Please help me, od you need more informatorom please write to me. Dominik
  • I am joining this discussion. If it were possible to use some kind of hook to get the graphic onto a canvas, you could do something like this:

    const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);
    const data = imageData.data;
    
    // Iterate through the pixels of the image
    for (let i = 0; i < data.length; i += 4) {
        const r = data[i];     // Red
        const g = data[i + 1]; // Green
        const b = data[i + 2]; // Blue
    
        // Check if the color is white (or close to white)
        if (r > 240 && g > 240 && b > 240) {
            // Set transparency (alpha to 0)
            data[i + 3] = 0;
        }
    }
    
    // Save the modified image to the canvas
    ctx.putImageData(imageData, 0, 0);
    

     Alternatively, we could consider using CSS filters, although I'm not sure if it's possible to achieve the effect of replacing white with transparency without affecting the other colors.

Login or Signup to post a comment