Take element height into consideration

The colorise function now takes the element height into consideration
when animating, which makes the animation look as intended when the
switch is customised.