0

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?

4

1 回答 1

1

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

于 2012-11-17T18:42:29.087 回答