Contour tool does not work with gradient mode

If you have gradient mode enabled, it will always use the second color rather than the first. This is a problem because especially in dithered gradient mode, if alpha0 is being used as the second color, then the contour tool will essentially not draw anything.
7284b6ba8fa85328536a26c8453f5b3a