kinda working (getDistance by edge color transition amount)