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
The query format=svg works with all get requests listed above.
Licensed under the MIT license.
© Peter R. Stuhlmann Webentwicklung. All rights reserved.