https://github.com/passeriform/recolor-svg
An API workaround to recolor an SVG (for bypassing GitHub markdown stylesheet restriction)
https://github.com/passeriform/recolor-svg
Last synced: 11 months ago
JSON representation
An API workaround to recolor an SVG (for bypassing GitHub markdown stylesheet restriction)
- Host: GitHub
- URL: https://github.com/passeriform/recolor-svg
- Owner: Passeriform
- Created: 2022-06-03T18:08:29.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-06-03T18:52:38.000Z (about 4 years ago)
- Last Synced: 2025-03-26T15:47:42.298Z (about 1 year ago)
- Language: TypeScript
- Size: 15.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Recolor-SVG
Simple API to recolor an SVG. Made to bypass GitHub markdown limitation on adding stylesheets.
# Usage
Pass the url as path into the API with options as query parameters.
## Basic Structure
https://recolor-svg.vercel.app/api/?color=
## Example
https://recolor-svg.vercel.app/api/https:/raw.githubusercontent.com/FortAwesome/Font-Awesome/6.x/svgs/brands/linkedin.svg?color=blue

# Supported options
### `color` :
All CSS3 supported value formats are supported for color.
**NOTE:** Special symbols *(like #)* must be escaped using URL encoding.
https://recolor-svg.vercel.app/api/?color=%237C23AE
would translate to  `#7C23AE`
### `size` :
Type: `` \
Example: `25`
Type: `x` \
Example: `25x25`
**NOTE:** In case a single value is provided, it returns a proportionally sized svg, with width equal to supplied value.
https://recolor-svg.vercel.app/api/?size=50x20
would translate to `50px` wide and `20px` high