Line color change is too strange

I draw a line.

original line color is maybe green thing.
and try to change a line color.

  1. green to red => dark red(?)
  2. green to white => green (?)
  3. green to blue => (?)

Input Key are ‘Q,W,E’

and why this happened? is it blend into the original color?
thank you.

example code:

The problem is you are defining the RGB value (0.2, 0.7, 0.2) as the value for vertex colors. In your keydown event listener, you set the color value of the material. These are two different things. Hence, both color values get multiplied.

@Mugen87 Thanks for reply.:ok_hand: