Skip to main content

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_file is source, output_file is result. color argument 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 the input_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

image

After

image

Metadata

Release files for svghelper 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for svghelper 0.0.6
File Size Uploaded Provenance Actions
svghelper-0.0.6.tar.gz 2.9 kB Without provenance Details for svghelper-0.0.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for svghelper 0.0.6
File Interpreter ABI Platform Actions
svghelper-0.0.6-py3-none-any.whl Python 3 none any Details for svghelper-0.0.6-py3-none-any.whl

Total release size: 6.3 kB

Release files / svghelper-0.0.6.tar.gz

Download URL svghelper-0.0.6.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
bc6e99e7a376a20bb8eb70b456255b86ac709f613150a5ed4ddb7b100647e756
BLAKE2b-256 checksum
How to use checksums
051ccdc7acadef0610d87b1e57020a0b842c835dacc14486d51b24dd435fec55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/0.0.0 CPython/3.7.6

Release files / svghelper-0.0.6-py3-none-any.whl

Download URL svghelper-0.0.6-py3-none-any.whl
Size 3.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
78426c7703a482fe74c52536f13ecac07b04513d8dc86a21ec3d8db6a6d462f4
BLAKE2b-256 checksum
How to use checksums
5deceab2caa9adece1694e083a1cf3bf232ed220c58f2e2ce1e71aadf0909a62
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/0.0.0 CPython/3.7.6

Security for svghelper 0.0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page