First, such formatting is conditional, so there is no need for the IF functions here (nor, normally, in general for Conditional Formatting [CF]). Formatting is triggered when the response to a formula is TRUE (or equivalent). So, for red fill:
is sufficient, as is:
for yellow fill. (Or,
=$K4>1 if the 'K' values are always integers.)
6 is greater than both
2 either a range for validity should be set rather than just a minimum (elaborating the formula) or, as here, the red fill rule should be above the yellow fill rule in the Conditional formatting rules list.
Second, a quick fix assuming that all J:K pairs are to be coloured, is to forego CF for green. Instead apply 'standard' (green) fill to the entire range. CF fill overrides 'standard' fill.
Third, if not the quick fix, then a formula for green fill such as:
Finally, the formula attempted does not work for
0, while the others do what is required, because of how CF interprets values. CF deems
0 to be
FALSE so the condition is not satisfied and therefore the associated formatting is not applied. Whereas, excluding
0, the return of any number is deemed
TRUE and the associated formatting triggered (as for the other rules).