Have a three-finger swipe upward bring up a panel that shows colors. Selecting one of those colors should make any lines you draw afterward appear in that color. No extra lines should be drawn by putting up that panel – or any lines drawn should be immediately deleted when the application realizes that it is dealing with a three-finger swipe.