javascript - CSS Color Overlay PNG -


I thought it would be the answer, but I could not find one.

I have a PNG image with a transparent background. Through CSS I want the image (not a transparent background) to turn it into a different color.

It should be a way of doing it through the web-kit ... but I have heard that the way is not supported ... is there another way to do this, if not, then How can I get this through the web-kit?

For my example, the red ball is a different color ...

JSFIDDLE:

HTML:

  Lt; Img id = "ball" src = "http: // www. Clker.com/cliparts/p/0/L/e/j/B/red-circle-solid-md.png" width = 100 height = 100 & gt;   

EDIT: I need to convert to hex or RGBA, not color! But if the hex is the conversion of a hue or a similar, then it can also work!

Thank you all! -liam

You can use the hue-rotate CSS3 filter. Change 120deg for your choice.

  #ball {-webkit-filter: hue-rotate (120deg); }   



Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -