VLZ Color Analysis is an API (and web interface for testing it) to extract the colors used in an SVG file.
Really just a wrapper for get-svg-colors so it can be used from VectorLogoZone, which is a static site.
It is a simple node app: npm install
then node server.js
.
The endpoint is /api
. It takes a single parameter url
that should be the full URL of an SVG file. Both GET
and POST
will work.
Try it!
The return is a JSON object with a colors
property that is an array of colors found in the SVG. Example:
{
"success": true,
"colors": [
"#1D8286"
],
"url": "https://www.vectorlogo.zone/logos/vectorlogozone/vectorlogozone-ar21.svg"
}
You can call is as JSONP by passing a callback
parameter.
Contributions are welcome! Please follow the standard Github Fork & Pull Request Workflow