I forgot to add to my original post: GIMP 2.10.28 running under ubuntu 20.04.
In case it is relevant I have attached the complete code. i just gave the one example, but the other four options with different colours are also incorrect.
In case it is relevant I have attached the complete code. i just gave the one example, but the other four options with different colours are also incorrect.