Michael
Michael

Reputation: 42100

How to imitate watercolor with JavaScript?

I wonder how to imitate watercolors in JavaScript. For instance, I would like to fill a shape in the screen as if it were painted with watercolors. Is there any JavaScript library for that?

Upvotes: 0

Views: 2271

Answers (1)

mccannf
mccannf

Reputation: 16659

Because a "watercolor" effect can take many forms in terms of the staining and where colors become more transparent or more opaque, this could end up being quite specific to the shape in question that you want to fill.

Only solution I can think of is:

  1. Prepare a number of scalable background images with watercolor effects. This will give you a selection to choose from which you can use to fill your shape or div.

    Example tutorials are out there for Photoshop and GIMP.

  2. Load up the background images dynamically and set the background of the shape to the relevant image when selected.

    See Set an Image object as a div background image using javascript

Upvotes: 1

Related Questions