I wouldn’t do this for a project full of images, but the shortest version is.
Drag image into an open QuPath window. I chose HDAB for my starting image colors, but you could chose that or H&E (later steps may look different).
Select the square tool and draw a square that includes both background and the two colors you want to separate.
Select the Analyze
menu and go to Preprocessing-Estimate stain vectors
Select Yes, as this sets the background to the kind of dirty slide background, otherwise a perfect white background of 255 255 255 is expected, and you do not have that.
Here you can see the two clusters of pixels and the lines, I won’t go into the details, but the idea is to get the two lines in each of the three tiles to match to one set of pixels. Kind of like a mini game.
The REAL way to do this would be to have two examples of the stains independently. Sometimes that is not possible though.
Clicking Auto gives me something like this
Which I manually adjusted to this.
Note that the darker stain line in the left most image lines up with the same darker pixels after adjustment. As you drag any one line around, the lines in the other images also change. It takes some getting used to. You can try just using Auto, that might work.
I click OK and save.
At this point I can press 1, 2 or 3 to changes between the original image and the two colors.
The View menu also has a Channel Viewer to show all of the channels at once.