Skip to content
API to analyze SVG colors for VectorLogoZone
JavaScript HTML Shell Dockerfile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
partials
static
templates
.editorconfig
.gitignore
Dockerfile
LICENSE.txt
README.md
deploy.sh
nodemon.json
now.json
package.json
run.sh
server.js

README.md

Color Analysis TIL Logo

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.

Running

It is a simple node app: npm install then node server.js.

Calling the API

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.

Contributing

Contributions are welcome! Please follow the standard Github Fork & Pull Request Workflow

License

GNU Affero General Public License v3.0

Credits

express.js Git Github Google Analytics Handlebars JavaScript Node.js npm Shoelace CSS Zeit

You can’t perform that action at this time.