1.0.7 • Published 3 years ago

svg-color v1.0.7

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

svg-color

Replace all colors of an svg string

import svgColor from 'svg-color';

const svg = `
    <?xml version="1.0" standalone="no"?>
    <svg width="200" height="150" xmlns="http://www.w3.org/2000/svg" version="1.1">
    <path d="M 10 75 Q 50 10 100 75 T 190 75" stroke="#000"
        stroke-linecap="round" stroke-dasharray="5,10,5" fill="#CCCCCC"/>
    <path d="M 10 75 L 190 75" stroke="#ededed"
        stroke-linecap="round" stroke-width="1" stroke-dasharray="5,5" fill="rgba(255, 0, 0)"/>
    </svg>
`;

const svgNew = svgColor(svg, 'white');
1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

7 years ago

1.0.0

7 years ago