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": "#71808708",
            "composition": {
                "red": "71",
                "green": "80",
                "blue": "87",
                "alpha": "08"
            }
        },
        "rgba": {
            "value": "rgba(113, 128, 135, 0.03)",
            "composition": {
                "red": 113,
                "green": 128,
                "blue": 135,
                "alpha": 0.03137
            }
        },
        "hsla": {
            "value": "hsla(199, 9%, 49%, 0.03)",
            "composition": {
                "hue": 199,
                "saturation": 9,
                "lightness": 49,
                "alpha": 0.03137
            }
        },
        "hsla_raw": {
            "value": "hsla(199.09091, 8.87097%, 48.62745%, 0.03)",
            "composition": {
                "hue": 199.09091,
                "saturation": 8.87097,
                "lightness": 48.62745,
                "alpha": 0.03137
            }
        }
    },
    "base_without_alpha": {
        "keyword": "",
        "hex": {
            "value": "#718087",
            "composition": {
                "red": "71",
                "green": "80",
                "blue": "87"
            }
        },
        "rgb": {
            "value": "rgb(113, 128, 135)",
            "composition": {
                "red": 113,
                "green": 128,
                "blue": 135
            }
        },
        "hsl": {
            "value": "hsl(199, 9%, 49%)",
            "composition": {
                "hue": 199,
                "saturation": 9,
                "lightness": 49
            }
        },
        "hsl_raw": {
            "value": "hsl(199.09091, 8.87097%, 48.62745%)",
            "composition": {
                "hue": 199.09091,
                "saturation": 8.87097,
                "lightness": 48.62745
            }
        }
    },
    "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": "#8e7f7808",
            "composition": {
                "red": "8e",
                "green": "7f",
                "blue": "78",
                "alpha": "08"
            }
        },
        "rgba": {
            "value": "rgba(142, 127, 120, 0.03)",
            "composition": {
                "red": 142,
                "green": 127,
                "blue": 120,
                "alpha": 0.03137
            }
        },
        "hsla": {
            "value": "hsla(19, 9%, 51%, 0.03)",
            "composition": {
                "hue": 19,
                "saturation": 9,
                "lightness": 51,
                "alpha": 0.03137
            }
        },
        "hsla_raw": {
            "value": "hsla(19.09091, 8.87097%, 51.37255%, 0.03)",
            "composition": {
                "hue": 19.09091,
                "saturation": 8.87097,
                "lightness": 51.37255,
                "alpha": 0.03137
            }
        }
    },
    "complementary_without_alpha": {
        "keyword": "",
        "hex": {
            "value": "#8e7f78",
            "composition": {
                "red": "8e",
                "green": "7f",
                "blue": "78"
            }
        },
        "rgb": {
            "value": "rgb(142, 127, 120)",
            "composition": {
                "red": 142,
                "green": 127,
                "blue": 120
            }
        },
        "hsl": {
            "value": "hsl(19, 9%, 51%)",
            "composition": {
                "hue": 19,
                "saturation": 9,
                "lightness": 51
            }
        },
        "hsl_raw": {
            "value": "hsl(19.09091, 8.87097%, 51.37255%)",
            "composition": {
                "hue": 19.09091,
                "saturation": 8.87097,
                "lightness": 51.37255
            }
        }
    },
    "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": "#7c7c7c08",
            "composition": {
                "red": "7c",
                "green": "7c",
                "blue": "7c",
                "alpha": "08"
            }
        },
        "rgba": {
            "value": "rgba(124, 124, 124, 0.03)",
            "composition": {
                "red": 124,
                "green": 124,
                "blue": 124,
                "alpha": 0.03137
            }
        },
        "hsla": {
            "value": "hsla(199, 0%, 49%, 0.03)",
            "composition": {
                "hue": 199,
                "saturation": 0,
                "lightness": 49,
                "alpha": 0.03137
            }
        },
        "hsla_raw": {
            "value": "hsla(199.09091, 0%, 48.62745%, 0.03)",
            "composition": {
                "hue": 199.09091,
                "saturation": 0,
                "lightness": 48.62745,
                "alpha": 0.03137
            }
        }
    },
    "grayscale_without_alpha": {
        "keyword": "",
        "hex": {
            "value": "#7c7c7c",
            "composition": {
                "red": "7c",
                "green": "7c",
                "blue": "7c"
            }
        },
        "rgb": {
            "value": "rgb(124, 124, 124)",
            "composition": {
                "red": 124,
                "green": 124,
                "blue": 124
            }
        },
        "hsl": {
            "value": "hsl(199, 0%, 49%)",
            "composition": {
                "hue": 199,
                "saturation": 0,
                "lightness": 49
            }
        },
        "hsl_raw": {
            "value": "hsl(199.09091, 0%, 48.62745%)",
            "composition": {
                "hue": 199.09091,
                "saturation": 0,
                "lightness": 48.62745
            }
        }
    },
    "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
            }
        }
    }
}