Is it possible to tint an image with a specific color using CSS without an overlay in a WebKit browser?
Failed attempts
- Managed to tint the image sepia or an arbitrary color using
hue-rotate
but couldn't find a way to tint it with a specific color.
- Creating a "tint" SVG filter and calling it with
-webkit-filter: url(#tint)
doesn't work on Chrome.
- All possible combinations of
opacity
/box-shadow
css properties with drop-shadow
/opacity
filters don't generate the desired effect.
Ideas
- Given a color, wouldn't it be possible to combine the HSB filters (
hue-rotate
, saturation
, brightness
) to generate its tint?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…