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": "#437fbe31",
            "composition": {
                "red": "43",
                "green": "7f",
                "blue": "be",
                "alpha": "31"
            }
        },
        "rgba": {
            "value": "rgba(67, 127, 190, 0.19)",
            "composition": {
                "red": 67,
                "green": 127,
                "blue": 190,
                "alpha": 0.19216
            }
        },
        "hsla": {
            "value": "hsla(211, 49%, 50%, 0.19)",
            "composition": {
                "hue": 211,
                "saturation": 49,
                "lightness": 50,
                "alpha": 0.19216
            }
        },
        "hsla_raw": {
            "value": "hsla(210.73171, 48.6166%, 50.39216%, 0.19)",
            "composition": {
                "hue": 210.73171,
                "saturation": 48.6166,
                "lightness": 50.39216,
                "alpha": 0.19216
            }
        }
    },
    "base_without_alpha": {
        "keyword": "",
        "hex": {
            "value": "#437fbe",
            "composition": {
                "red": "43",
                "green": "7f",
                "blue": "be"
            }
        },
        "rgb": {
            "value": "rgb(67, 127, 190)",
            "composition": {
                "red": 67,
                "green": 127,
                "blue": 190
            }
        },
        "hsl": {
            "value": "hsl(211, 49%, 50%)",
            "composition": {
                "hue": 211,
                "saturation": 49,
                "lightness": 50
            }
        },
        "hsl_raw": {
            "value": "hsl(210.73171, 48.6166%, 50.39216%)",
            "composition": {
                "hue": 210.73171,
                "saturation": 48.6166,
                "lightness": 50.39216
            }
        }
    },
    "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": "#bc804131",
            "composition": {
                "red": "bc",
                "green": "80",
                "blue": "41",
                "alpha": "31"
            }
        },
        "rgba": {
            "value": "rgba(188, 128, 65, 0.19)",
            "composition": {
                "red": 188,
                "green": 128,
                "blue": 65,
                "alpha": 0.19216
            }
        },
        "hsla": {
            "value": "hsla(31, 49%, 50%, 0.19)",
            "composition": {
                "hue": 31,
                "saturation": 49,
                "lightness": 50,
                "alpha": 0.19216
            }
        },
        "hsla_raw": {
            "value": "hsla(30.73171, 48.6166%, 49.60784%, 0.19)",
            "composition": {
                "hue": 30.73171,
                "saturation": 48.6166,
                "lightness": 49.60784,
                "alpha": 0.19216
            }
        }
    },
    "complementary_without_alpha": {
        "keyword": "",
        "hex": {
            "value": "#bc8041",
            "composition": {
                "red": "bc",
                "green": "80",
                "blue": "41"
            }
        },
        "rgb": {
            "value": "rgb(188, 128, 65)",
            "composition": {
                "red": 188,
                "green": 128,
                "blue": 65
            }
        },
        "hsl": {
            "value": "hsl(31, 49%, 50%)",
            "composition": {
                "hue": 31,
                "saturation": 49,
                "lightness": 50
            }
        },
        "hsl_raw": {
            "value": "hsl(30.73171, 48.6166%, 49.60784%)",
            "composition": {
                "hue": 30.73171,
                "saturation": 48.6166,
                "lightness": 49.60784
            }
        }
    },
    "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": "#81818131",
            "composition": {
                "red": "81",
                "green": "81",
                "blue": "81",
                "alpha": "31"
            }
        },
        "rgba": {
            "value": "rgba(129, 129, 129, 0.19)",
            "composition": {
                "red": 129,
                "green": 129,
                "blue": 129,
                "alpha": 0.19216
            }
        },
        "hsla": {
            "value": "hsla(211, 0%, 50%, 0.19)",
            "composition": {
                "hue": 211,
                "saturation": 0,
                "lightness": 50,
                "alpha": 0.19216
            }
        },
        "hsla_raw": {
            "value": "hsla(210.73171, 0%, 50.39216%, 0.19)",
            "composition": {
                "hue": 210.73171,
                "saturation": 0,
                "lightness": 50.39216,
                "alpha": 0.19216
            }
        }
    },
    "grayscale_without_alpha": {
        "keyword": "",
        "hex": {
            "value": "#818181",
            "composition": {
                "red": "81",
                "green": "81",
                "blue": "81"
            }
        },
        "rgb": {
            "value": "rgb(129, 129, 129)",
            "composition": {
                "red": 129,
                "green": 129,
                "blue": 129
            }
        },
        "hsl": {
            "value": "hsl(211, 0%, 50%)",
            "composition": {
                "hue": 211,
                "saturation": 0,
                "lightness": 50
            }
        },
        "hsl_raw": {
            "value": "hsl(210.73171, 0%, 50.39216%)",
            "composition": {
                "hue": 210.73171,
                "saturation": 0,
                "lightness": 50.39216
            }
        }
    },
    "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
            }
        }
    }
}