This paper proposes a new visual positioning method for a humanoid robot to approach and grasp a valve based on colour and shape constraints. The robot has two cameras in its head and uses constraints of colour rectangle marks to determine the valve's position and pose. When the hands are near the valve, an image-based visual servoing method is employed to catch the handle of the valve via cameras in end-effectors. Experimental results are presented to verify the effectiveness of the proposed method.