Python SVG helper. set svg color, etc.
Project description
svghelper
Python SVG helper. set/replace svg color, etc.
Install
python -m pip install svghelper
Method Overview
-
set_color(input_file: str, output_file: str, color: str)- set the color of a svg file.input_fileis source,output_fileis result.colorargument should be 6 digits string color like#FF0000. -
set_files_color(input_dir: str, output_dir: str, output_color: str)- set the color of svg files in theinput_dir. -
replace_color(input_file: str, output_file: str, input_color: str, output_color: str)- replace the color. -
replace_files_color(input_dir: str, output_dir: str, input_color: str, output_color: str)- replace svg files' color. -
set_comp_color(input_file: str, output_file: str)- set complementary color. -
set_files_comp_color(input_dir: str, output_dir: str)- set svg files' complementary color
Included Package
Example
Code Sample
import svghelper
# Copy capture.svg as capture2.svg and change the major color of it to #FF0000(red)
svghelper.set_color('capture.svg', 'capture2.svg', '#FF0000')
Result
Before
After
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file svghelper-0.0.6.tar.gz.
File metadata
- Download URL: svghelper-0.0.6.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/0.0.0 CPython/3.7.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc6e99e7a376a20bb8eb70b456255b86ac709f613150a5ed4ddb7b100647e756
|
|
| MD5 |
a65dc6a528c0fab7a8a8383b9ffbf05f
|
|
| BLAKE2b-256 |
051ccdc7acadef0610d87b1e57020a0b842c835dacc14486d51b24dd435fec55
|
File details
Details for the file svghelper-0.0.6-py3-none-any.whl.
File metadata
- Download URL: svghelper-0.0.6-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/0.0.0 CPython/3.7.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78426c7703a482fe74c52536f13ecac07b04513d8dc86a21ec3d8db6a6d462f4
|
|
| MD5 |
6fed636ac17ab76a9d599c5f98b52434
|
|
| BLAKE2b-256 |
5deceab2caa9adece1694e083a1cf3bf232ed220c58f2e2ce1e71aadf0909a62
|