I need idea how i can make brush who can color smudge.
Example in picture: right side painting with basic brush with two different colors in left also painting but additional use smudge tool, the result should be something like left side
I need advice how i can try to do it
You will need to manipulate pixels to achieve a smudge effect.
You can get the pixel information from the canvas using context.getImageData
.
As the user moves an imaginary brush over existing pixels, you can mimic smudging with a real brush by:
Use the image data to calculate the average color the user has moved over so far.
Set the fillStyle
to that average color.
Set the alpha of the fillStyle to a semi-transparent value (maybe 25%).
As the user drags the brush, draw a series of overlapping circles over the existing pixels using the semi-transparent, color-averaged fill.
If a particular client device has more processing power, you might enhance the effect with shadowing.