The color picker of trains looks like a pipette so the first instinct you have is to click on it and select something on the screen to pick the color. Not the behavior implemented, closes the color picker instead.
Change the icon OR implement a real pipette that takes the color you select on screen.
What

Factorio
Why

Paint pipette to select a color

But "trying" to select a color closes the Color Picker window.

I tried multiple times thinking I must have used the wrong key combination to make it work. Seems like it's only a color picker. So I think this is kind of misleading.