Implements function mediumcolor imgAct and passed the test.