Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.

VectorLogoZone/vlz-color-analysis

Repository files navigation

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

About

API to analyze SVG colors for VectorLogoZone

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •