Stop color change
What's this?
This is an REST API to get a requested color, its complementary and its grayscale in different formats and the black or white text corresponding to each color according to its brightness.
Color formats
Keyword
HEX
RGB / RGBA
HSL / HSLA
Request
You can use Keyword, HEX(3,4,6 or 8 characters), RGB or RGBA and HSL or HSLA formats to send your color.
Returned colors
Base (requested)
Base (requested) without alpha
Contrasted text
Complementary
Complementary without alpha
Contrasted text
Grayscale
Grayscale without alpha
Contrasted text
Returned colors in JSON
                
                    {
                        "base": {...},
                        "base_without_alpha": {...},
                        "base_without_alpha_contrasted_text": {...},
                        "complementary": {...},
                        "complementary_without_alpha": {...},
                        "complementary_without_alpha_contrasted_text": {...},
                        "grayscale": {...},
                        "grayscale_without_alpha": {...},
                        "grayscale_without_alpha_contrasted_text": {...}
                    }
                
            
Data for each color in JSON
                
                    {
                        "keyword": "aquamarine",
                        "hex": {
                            "value": "#7fffd4",
                            "composition": {
                            "red": "7f",
                            "green": "ff",
                            "blue": "d4"
                            }
                        },
                        "rgb": {
                            "value": "rgb(127, 255, 212)",
                            "composition": {
                            "red": 127,
                            "green": 255,
                            "blue": 212
                            }
                        },
                        "hsl": {
                            "value": "hsl(160, 100%, 75%)",
                            "composition": {
                            "hue": 160,
                            "saturation": 100,
                            "lightness": 75
                            }
                        },
                        "hsl_raw": {
                            "value": "hsl(159.84375, 100%, 74.90196%)",
                            "composition": {
                            "hue": 159.84375,
                            "saturation": 100,
                            "lightness": 74.90196
                            }
                        }
                    }
                
            
Example error API response
                
                {
                    "status": "error",
                    "error": {
                        "type": "wrong color format",
                        "value": "yellou",
                        "message": "not a valid KEYWORD color"
                    }
                }
                
            
Example success API response
                
                {
    "status": "success",
    "base": {
        "keyword": "",
        "hex": {
            "value": "#e829f09e",
            "composition": {
                "red": "e8",
                "green": "29",
                "blue": "f0",
                "alpha": "9e"
            }
        },
        "rgba": {
            "value": "rgba(232, 41, 240, 0.62)",
            "composition": {
                "red": 232,
                "green": 41,
                "blue": 240,
                "alpha": 0.61961
            }
        },
        "hsla": {
            "value": "hsla(298, 87%, 55%, 0.62)",
            "composition": {
                "hue": 298,
                "saturation": 87,
                "lightness": 55,
                "alpha": 0.61961
            }
        },
        "hsla_raw": {
            "value": "hsla(297.58794, 86.89956%, 55.09804%, 0.62)",
            "composition": {
                "hue": 297.58794,
                "saturation": 86.89956,
                "lightness": 55.09804,
                "alpha": 0.61961
            }
        }
    },
    "base_without_alpha": {
        "keyword": "",
        "hex": {
            "value": "#e829f0",
            "composition": {
                "red": "e8",
                "green": "29",
                "blue": "f0"
            }
        },
        "rgb": {
            "value": "rgb(232, 41, 240)",
            "composition": {
                "red": 232,
                "green": 41,
                "blue": 240
            }
        },
        "hsl": {
            "value": "hsl(298, 87%, 55%)",
            "composition": {
                "hue": 298,
                "saturation": 87,
                "lightness": 55
            }
        },
        "hsl_raw": {
            "value": "hsl(297.58794, 86.89956%, 55.09804%)",
            "composition": {
                "hue": 297.58794,
                "saturation": 86.89956,
                "lightness": 55.09804
            }
        }
    },
    "base_without_alpha_contrasted_text": {
        "keyword": "white",
        "hex": {
            "value": "#ffffff",
            "composition": {
                "red": "ff",
                "green": "ff",
                "blue": "ff"
            }
        },
        "rgb": {
            "value": "rgb(255, 255, 255)",
            "composition": {
                "red": 255,
                "green": 255,
                "blue": 255
            }
        },
        "hsl": {
            "value": "hsl(0, 0%, 100%)",
            "composition": {
                "hue": 0,
                "saturation": 0,
                "lightness": 100
            }
        },
        "hsl_raw": {
            "value": "hsl(0, 0%, 100%)",
            "composition": {
                "hue": 0,
                "saturation": 0,
                "lightness": 100
            }
        }
    },
    "complementary": {
        "keyword": "",
        "hex": {
            "value": "#17d60f9e",
            "composition": {
                "red": "17",
                "green": "d6",
                "blue": "0f",
                "alpha": "9e"
            }
        },
        "rgba": {
            "value": "rgba(23, 214, 15, 0.62)",
            "composition": {
                "red": 23,
                "green": 214,
                "blue": 15,
                "alpha": 0.61961
            }
        },
        "hsla": {
            "value": "hsla(118, 87%, 45%, 0.62)",
            "composition": {
                "hue": 118,
                "saturation": 87,
                "lightness": 45,
                "alpha": 0.61961
            }
        },
        "hsla_raw": {
            "value": "hsla(117.58794, 86.89956%, 44.90196%, 0.62)",
            "composition": {
                "hue": 117.58794,
                "saturation": 86.89956,
                "lightness": 44.90196,
                "alpha": 0.61961
            }
        }
    },
    "complementary_without_alpha": {
        "keyword": "",
        "hex": {
            "value": "#17d60f",
            "composition": {
                "red": "17",
                "green": "d6",
                "blue": "0f"
            }
        },
        "rgb": {
            "value": "rgb(23, 214, 15)",
            "composition": {
                "red": 23,
                "green": 214,
                "blue": 15
            }
        },
        "hsl": {
            "value": "hsl(118, 87%, 45%)",
            "composition": {
                "hue": 118,
                "saturation": 87,
                "lightness": 45
            }
        },
        "hsl_raw": {
            "value": "hsl(117.58794, 86.89956%, 44.90196%)",
            "composition": {
                "hue": 117.58794,
                "saturation": 86.89956,
                "lightness": 44.90196
            }
        }
    },
    "complementary_without_alpha_contrasted_text": {
        "keyword": "black",
        "hex": {
            "value": "#000000",
            "composition": {
                "red": "00",
                "green": "00",
                "blue": "00"
            }
        },
        "rgb": {
            "value": "rgb(0, 0, 0)",
            "composition": {
                "red": 0,
                "green": 0,
                "blue": 0
            }
        },
        "hsl": {
            "value": "hsl(0, 0%, 0%)",
            "composition": {
                "hue": 0,
                "saturation": 0,
                "lightness": 0
            }
        },
        "hsl_raw": {
            "value": "hsl(0, 0%, 0%)",
            "composition": {
                "hue": 0,
                "saturation": 0,
                "lightness": 0
            }
        }
    },
    "grayscale": {
        "keyword": "",
        "hex": {
            "value": "#8d8d8d9e",
            "composition": {
                "red": "8d",
                "green": "8d",
                "blue": "8d",
                "alpha": "9e"
            }
        },
        "rgba": {
            "value": "rgba(141, 141, 141, 0.62)",
            "composition": {
                "red": 141,
                "green": 141,
                "blue": 141,
                "alpha": 0.61961
            }
        },
        "hsla": {
            "value": "hsla(298, 0%, 55%, 0.62)",
            "composition": {
                "hue": 298,
                "saturation": 0,
                "lightness": 55,
                "alpha": 0.61961
            }
        },
        "hsla_raw": {
            "value": "hsla(297.58794, 0%, 55.09804%, 0.62)",
            "composition": {
                "hue": 297.58794,
                "saturation": 0,
                "lightness": 55.09804,
                "alpha": 0.61961
            }
        }
    },
    "grayscale_without_alpha": {
        "keyword": "",
        "hex": {
            "value": "#8d8d8d",
            "composition": {
                "red": "8d",
                "green": "8d",
                "blue": "8d"
            }
        },
        "rgb": {
            "value": "rgb(141, 141, 141)",
            "composition": {
                "red": 141,
                "green": 141,
                "blue": 141
            }
        },
        "hsl": {
            "value": "hsl(298, 0%, 55%)",
            "composition": {
                "hue": 298,
                "saturation": 0,
                "lightness": 55
            }
        },
        "hsl_raw": {
            "value": "hsl(297.58794, 0%, 55.09804%)",
            "composition": {
                "hue": 297.58794,
                "saturation": 0,
                "lightness": 55.09804
            }
        }
    },
    "grayscale_without_alpha_contrasted_text": {
        "keyword": "white",
        "hex": {
            "value": "#ffffff",
            "composition": {
                "red": "ff",
                "green": "ff",
                "blue": "ff"
            }
        },
        "rgb": {
            "value": "rgb(255, 255, 255)",
            "composition": {
                "red": 255,
                "green": 255,
                "blue": 255
            }
        },
        "hsl": {
            "value": "hsl(0, 0%, 100%)",
            "composition": {
                "hue": 0,
                "saturation": 0,
                "lightness": 100
            }
        },
        "hsl_raw": {
            "value": "hsl(0, 0%, 100%)",
            "composition": {
                "hue": 0,
                "saturation": 0,
                "lightness": 100
            }
        }
    }
}