Click your mouse to place block. Change colour, brightness, and size by adjusting the sliders. To hide the sliders, press d, and to show them again, press s. to use the eraser, press e, and to go back to drawing press w.
Thx to @Griifpatch for the "snapping to grid" script. All other work by me.