Oh that's it! Damn percentages.Oh I see.
The color coding is just defined at convenient percentages (20% and 30%) and not really correlated to anything. I'm not sure the exact percentage the HP has to be under in order for capture to succeed.
Thanks for your help, keep up with the great work!