I am attempting to create a color-coded grid diagram for a cross-stitch pattern. As shown in the attached image (sorry it is a little blurry, this is just my test run), I have a white "background" layer, a "symbols" layer with the pattern showing the symbols of the pattern for each square, a "grid" layer with a blank grid used to control where the color via bucket fill will go), and a transparent "colors" layer that I am using to bucket fill the appropriate colors in each square (specific to the symbol shown on the symbols layer). In this fashion, I will have a layer for the blank grid as well as a layer for the colors. When doing the bucket fill, I will be using the "sample merged" feature since I only want a single square to be filled with each color (based off of the grid layer). However, here is where is run into a problem. With the "sample merged" feature on, GIMP of course will look at the symbols layer as well, and not just fill in the grid layer with a color. So, at this point, all I have been able to figure out is that I would need to make the symbols layer invisible before adding the color. But I need to see the symbol layer to know which color to put in each square! Toggling the visibility of the symbol layer would be exceeding tedious and time consuming (as there are approximately 65,000 squares on this one pattern alone. If this is the only way to do it, then so be it...but I was hoping someone out there knew of a way to make the symbols layer visible to me, but not to GIMP...sort of a selective "sample merged" option?


GIMP image and layers

  • You get my +1 in spite of your blurry example because I love your title or subject line. Also I love the idea of doing this. Crazy but charming. Hope you do not get inflamations in your mouse-finger(s). – Martin Zaske Dec 29 '18 at 22:44
  1. First hide your other layers and go to your symbols layer, select all that is black and make it pure green 0 100 0

  2. Where you have "closed" symbols with white fill, "open" them up by drawing white lines accross your entire page cutting all those open.

  3. Now go to your grid layer and hide the other layers and select all that is black and make it pure red 100 0 0

  4. Now go to your color layer and change your bucket-fill-tool-settings one tiny detail: Fill by "Red" instead of "Composite". Now you got what you want, but instead of "hiding" a layer, you just made Gimp color-blind. I am testing this in my Gimp and it is working. :)

It is very late. If you have trouble, give me a shout and some patience, and I will make screen-shots in a few days. Not on my desk every day. If you upload a real sample, I could use that for you.

Oops, my first tests were working, now, trying several different fill-colors I hit some unexpected behaviour. So you might need to tweak this some more, sorry, but my main idea is to focus the "criterion used to determin color similiarity". Maybe lighter symbols and a full black grid might work better for you.


No way I see besides a script to hide the mayer before the bucket-fil, but then if you have a script it can do other things as well.

You can change your technique:

  • Select the grid
  • Do a fuzzy select on the square (without Sample merged of course)
  • Select the colors
  • Bucket-fill the selection

Selecting the grid/colors layers is just moving up/down the stack with the PgUp and PgDn keys, so it can be "muscle memory" and be fast.

Now if you are trying to set symbols according to color, or colors according to symbols, there may be tricks to do that all in one go.

  • I thought that perhaps a script could be written to do this, but scripting is a bit outside my skillset and desire. I'm often blown away by what can be done with them, but I just don't know how to do it and have little interest in learning it. Your alternative technique has given me a few ideas for better approaches though. Thanks! – chemtox Aug 3 '18 at 16:13

Here's a different approach.

Create a new layer on top of all your layers, set the Layer Blend Mode to "multiply".

Create a new square Brush, choose the Pencil Tool (not the Brush tool), set to the exact size of one of your squares.

Paint the colours in. Note that holding down CTRL+shift allows you to draw straight lines between clicks of the Pencil tool.

For example

enter image description here

  • Thanks for the suggestion. I've been noodling with it since yesterday and I think it has a bit of promise. It is a bit cumbersome since I need to position the paint brush exactly where it needs to be as opposed to the point and click technique for a bucket fill, but I like that it can do large areas of coverage more easily. I'm not sure if it will give me the look I was going for, but I'm going to keep experimenting with this and see what shakes out. – chemtox Aug 3 '18 at 16:10
  • @chemtox Snap to grid. – wizzwizz4 Mar 20 at 21:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.