And these sprites have the colors already in instance variables, so i wonder what could be the best option to copy the clicked color of the sprite to the canvas.
Once you grab the color values from the sprite, you can fill the entire canvas with that color using this action:
-> DrawingCanvas: Clear canvas rgbex255(r, g, b)
However, flood-filling a portion of the picture (like one tooth or one part of a tooth) is much more difficult. The example in that link I posted is using a JavaScript code to flood-fill an area.
.
There is a completely different approach without a canvas. Put each tooth in a separate animation frame in a sprite. Fill each surface of the tooth with different colors in the editor. So there will be 5 unique colors, repeating on every tooth in the sprite.
And then use ReplaceColor effect. Here is a little demo:
dropbox.com/s/0kvmlzzj6szop57/RainbowTeeth2.c3p