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": "#705b5a4b",
            "composition": {
                "red": "70",
                "green": "5b",
                "blue": "5a",
                "alpha": "4b"
            }
        },
        "rgba": {
            "value": "rgba(112, 91, 90, 0.29)",
            "composition": {
                "red": 112,
                "green": 91,
                "blue": 90,
                "alpha": 0.29412
            }
        },
        "hsla": {
            "value": "hsla(3, 11%, 40%, 0.29)",
            "composition": {
                "hue": 3,
                "saturation": 11,
                "lightness": 40,
                "alpha": 0.29412
            }
        },
        "hsla_raw": {
            "value": "hsla(2.72727, 10.89109%, 39.60784%, 0.29)",
            "composition": {
                "hue": 2.72727,
                "saturation": 10.89109,
                "lightness": 39.60784,
                "alpha": 0.29412
            }
        }
    },
    "base_without_alpha": {
        "keyword": "",
        "hex": {
            "value": "#705b5a",
            "composition": {
                "red": "70",
                "green": "5b",
                "blue": "5a"
            }
        },
        "rgb": {
            "value": "rgb(112, 91, 90)",
            "composition": {
                "red": 112,
                "green": 91,
                "blue": 90
            }
        },
        "hsl": {
            "value": "hsl(3, 11%, 40%)",
            "composition": {
                "hue": 3,
                "saturation": 11,
                "lightness": 40
            }
        },
        "hsl_raw": {
            "value": "hsl(2.72727, 10.89109%, 39.60784%)",
            "composition": {
                "hue": 2.72727,
                "saturation": 10.89109,
                "lightness": 39.60784
            }
        }
    },
    "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": "#8fa4a54b",
            "composition": {
                "red": "8f",
                "green": "a4",
                "blue": "a5",
                "alpha": "4b"
            }
        },
        "rgba": {
            "value": "rgba(143, 164, 165, 0.29)",
            "composition": {
                "red": 143,
                "green": 164,
                "blue": 165,
                "alpha": 0.29412
            }
        },
        "hsla": {
            "value": "hsla(183, 11%, 60%, 0.29)",
            "composition": {
                "hue": 183,
                "saturation": 11,
                "lightness": 60,
                "alpha": 0.29412
            }
        },
        "hsla_raw": {
            "value": "hsla(182.72727, 10.89109%, 60.39216%, 0.29)",
            "composition": {
                "hue": 182.72727,
                "saturation": 10.89109,
                "lightness": 60.39216,
                "alpha": 0.29412
            }
        }
    },
    "complementary_without_alpha": {
        "keyword": "",
        "hex": {
            "value": "#8fa4a5",
            "composition": {
                "red": "8f",
                "green": "a4",
                "blue": "a5"
            }
        },
        "rgb": {
            "value": "rgb(143, 164, 165)",
            "composition": {
                "red": 143,
                "green": 164,
                "blue": 165
            }
        },
        "hsl": {
            "value": "hsl(183, 11%, 60%)",
            "composition": {
                "hue": 183,
                "saturation": 11,
                "lightness": 60
            }
        },
        "hsl_raw": {
            "value": "hsl(182.72727, 10.89109%, 60.39216%)",
            "composition": {
                "hue": 182.72727,
                "saturation": 10.89109,
                "lightness": 60.39216
            }
        }
    },
    "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": "#6565654b",
            "composition": {
                "red": "65",
                "green": "65",
                "blue": "65",
                "alpha": "4b"
            }
        },
        "rgba": {
            "value": "rgba(101, 101, 101, 0.29)",
            "composition": {
                "red": 101,
                "green": 101,
                "blue": 101,
                "alpha": 0.29412
            }
        },
        "hsla": {
            "value": "hsla(3, 0%, 40%, 0.29)",
            "composition": {
                "hue": 3,
                "saturation": 0,
                "lightness": 40,
                "alpha": 0.29412
            }
        },
        "hsla_raw": {
            "value": "hsla(2.72727, 0%, 39.60784%, 0.29)",
            "composition": {
                "hue": 2.72727,
                "saturation": 0,
                "lightness": 39.60784,
                "alpha": 0.29412
            }
        }
    },
    "grayscale_without_alpha": {
        "keyword": "",
        "hex": {
            "value": "#656565",
            "composition": {
                "red": "65",
                "green": "65",
                "blue": "65"
            }
        },
        "rgb": {
            "value": "rgb(101, 101, 101)",
            "composition": {
                "red": 101,
                "green": 101,
                "blue": 101
            }
        },
        "hsl": {
            "value": "hsl(3, 0%, 40%)",
            "composition": {
                "hue": 3,
                "saturation": 0,
                "lightness": 40
            }
        },
        "hsl_raw": {
            "value": "hsl(2.72727, 0%, 39.60784%)",
            "composition": {
                "hue": 2.72727,
                "saturation": 0,
                "lightness": 39.60784
            }
        }
    },
    "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
            }
        }
    }
}