react-svg-color
v2.3.0
Published
Replace any colors from a svg file
Readme
react-svg-color
react-svg-color allows you to change any color in a svg file.
Installation
npm i react-svg-colorAn 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"]}
/>Result
Props
| 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 |
