How can I color a square?

How to paint a rectangle or any form without the player fill out?