How do u do this?

ok look:

see how when u rollover it starts changing colors and when u rolloff it flips straight back to normal?

well how do the people make it so when u hover over for so long and its not dont going through it goes back? instead of flipping back?

thx if anyone knows how…