I seems to be a bug, thanks for the report. Some colors are sometimes incorrectly "rounded" down. As a workaround, you can switch from "Smoothing" to "No smoothing" mode in the toolbar above the canvas while using this tool. In that case, it should preserve the color.