Tint an image in ReactJS

末鹿安然 提交于 2019-12-24 07:28:16

问题


I have a bunch of icons where on each icon, the background is transparent and the icon itself is filled in white. I would like to tint the color of these icons somehow in ReactJS. The colors will be pulled from this.state.color which in my scenario, is a color that a user can choose from the front end. For example, if I choose the color red, the icon will turn red while the background remains transparent. Is this possible in ReactJS without using a plugin?

来源:https://stackoverflow.com/questions/41473264/tint-an-image-in-reactjs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!