react-svg-color
allows you to change any color in a svg file.
npm i react-svg-color
An example of how to use the component
import SvgColor from 'react-svg-color'
import Umbrella from 'umbrella.svg'
...
<SvgColor
svg={Umbrella}
width={200}
colors={["#7EADCC", "#316F99", "#FFFDB8", "#FF8D78", "#FF8D78", "#7EADCC", "#B8FFF6", "#B8FFF6","#FF8D78"]}
/>
Name | Type | Description |
---|---|---|
svg |
svg file | Paste your svg file |
width |
int | Change width |
colors |
array[String] | Color array to change the desired colors (hex) |
rotate |
int | Change rotation |