Sure, you will need some sort of script to do anything beyond converting to some colour space, but that is a minor issue.
Take e.g. the colour green pixels appearing in some slides, that is (I guess) a colocolisation of alcian blue and Saffron, so if you try using HSB colour space, you have a problem on how to assess what is stained with alcian blue (blue) and what with the Saffron (yellow), because some tissue components are not exclusively stained by a single dye, they uptake several (e.g. cartilage, ends up green)… now add 3 more dyes to the mix. Pixels of a given colour might be due to different mixtures of the 5 dyes. It would be complicated to quantify what the colours mean (perhaps not possible if you are using RGB images). Maybe with hyperspectral imaging you can assess the absorption of each dye better, but I still think it might be quite complicated to do.
If you succeed, let us know!