Skip to content
A simple API that converts color values
JavaScript
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
helpers
v1
.gitignore
.nowignore
LICENSE
README.md
index.js
now.json
package.json
response-example.png

README.md

ColorConverter API

API MIT License Code size open issues closed issues Developer


Requests

request   To convert the colors, use the following get requests. By default you will get the response in JSON format. If you add the query format=svg, an SVG of the specified color will be returned.

Convert RGB https://color-converter.com/v1/convert?rgb=25,25,112

{
    "color": {
        "name": "midnightblue",
        "exact": true
    },
    "hex": "191970",
    "hsl": {
        "hue": 240,
        "saturation": 64,
        "luminance": 27
    },
    "hsv": {
        "hue": 240,
        "saturation": 64,
        "value": 44
    },
    "rgb": {
        "red": 25,
        "green": 25,
        "blue": 112
    },
    "cmyk": {
        "c": 78,
        "m": 78,
        "y": 0,
        "k": 56
    },
    "image": "https://color-converter.com/v1/convert?rgb=25,25,112&format=svg"
}

Convert color name https://color-converter.com/v1/convert?colorname=midnightblue

Convert HEX https://color-converter.com/v1/convert?hex=191970

Convert HSL https://color-converter.com/v1/convert?hsl=240,64,27

Convert HSV https://color-converter.com/v1/convert?hsv=240,64,44

Convert CMYK https://color-converter.com/v1/convert?cmyk=78,78,0,56

Request RGB and get a svg image https://color-converter.com/v1/convert?rgb=25,25,112&format=svg screenshot of svg response
The query format=svg works with all get requests listed above.


License

Licensed under the MIT license.


© Peter R. Stuhlmann Webentwicklung. All rights reserved.

You can’t perform that action at this time.