dynamically changes pen colour and thickness