Red and yellow are two of the ten standard colors used for coding the value of components (especially resistors). It's a very old system, predating me considerably, and it's used worldwide. I've been familiar with it since the early 1960s, so it's second nature to me. Red is the code for 2, and yellow for 4, hence the reference to “24” in the cartoon. The omega (Ω) is the symbol for ohms, the unit of electrical resistance.
The “red touches yellow” is part of a rhyme for telling a coral snake apart from a king snake. This is important where both snakes coexist (like in Florida), as the coral snake is venomous, and the king snake is not. The complete rhyme:
Red Touch Yellow - Kills a Fellow
Red Touch Black - Venom Lack
Yellow Touches Red - Soon You'll Be Dead
Red Touches Black - Friend of Jack