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": "#4676193d",
            "composition": {
                "red": "46",
                "green": "76",
                "blue": "19",
                "alpha": "3d"
            }
        },
        "rgba": {
            "value": "rgba(70, 118, 25, 0.24)",
            "composition": {
                "red": 70,
                "green": 118,
                "blue": 25,
                "alpha": 0.23922
            }
        },
        "hsla": {
            "value": "hsla(91, 65%, 28%, 0.24)",
            "composition": {
                "hue": 91,
                "saturation": 65,
                "lightness": 28,
                "alpha": 0.23922
            }
        },
        "hsla_raw": {
            "value": "hsla(90.96774, 65.03497%, 28.03922%, 0.24)",
            "composition": {
                "hue": 90.96774,
                "saturation": 65.03497,
                "lightness": 28.03922,
                "alpha": 0.23922
            }
        }
    },
    "base_without_alpha": {
        "keyword": "",
        "hex": {
            "value": "#467619",
            "composition": {
                "red": "46",
                "green": "76",
                "blue": "19"
            }
        },
        "rgb": {
            "value": "rgb(70, 118, 25)",
            "composition": {
                "red": 70,
                "green": 118,
                "blue": 25
            }
        },
        "hsl": {
            "value": "hsl(91, 65%, 28%)",
            "composition": {
                "hue": 91,
                "saturation": 65,
                "lightness": 28
            }
        },
        "hsl_raw": {
            "value": "hsl(90.96774, 65.03497%, 28.03922%)",
            "composition": {
                "hue": 90.96774,
                "saturation": 65.03497,
                "lightness": 28.03922
            }
        }
    },
    "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": "#b989e63d",
            "composition": {
                "red": "b9",
                "green": "89",
                "blue": "e6",
                "alpha": "3d"
            }
        },
        "rgba": {
            "value": "rgba(185, 137, 230, 0.24)",
            "composition": {
                "red": 185,
                "green": 137,
                "blue": 230,
                "alpha": 0.23922
            }
        },
        "hsla": {
            "value": "hsla(271, 65%, 72%, 0.24)",
            "composition": {
                "hue": 271,
                "saturation": 65,
                "lightness": 72,
                "alpha": 0.23922
            }
        },
        "hsla_raw": {
            "value": "hsla(270.96774, 65.03497%, 71.96078%, 0.24)",
            "composition": {
                "hue": 270.96774,
                "saturation": 65.03497,
                "lightness": 71.96078,
                "alpha": 0.23922
            }
        }
    },
    "complementary_without_alpha": {
        "keyword": "",
        "hex": {
            "value": "#b989e6",
            "composition": {
                "red": "b9",
                "green": "89",
                "blue": "e6"
            }
        },
        "rgb": {
            "value": "rgb(185, 137, 230)",
            "composition": {
                "red": 185,
                "green": 137,
                "blue": 230
            }
        },
        "hsl": {
            "value": "hsl(271, 65%, 72%)",
            "composition": {
                "hue": 271,
                "saturation": 65,
                "lightness": 72
            }
        },
        "hsl_raw": {
            "value": "hsl(270.96774, 65.03497%, 71.96078%)",
            "composition": {
                "hue": 270.96774,
                "saturation": 65.03497,
                "lightness": 71.96078
            }
        }
    },
    "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": "#4848483d",
            "composition": {
                "red": "48",
                "green": "48",
                "blue": "48",
                "alpha": "3d"
            }
        },
        "rgba": {
            "value": "rgba(72, 72, 72, 0.24)",
            "composition": {
                "red": 72,
                "green": 72,
                "blue": 72,
                "alpha": 0.23922
            }
        },
        "hsla": {
            "value": "hsla(91, 0%, 28%, 0.24)",
            "composition": {
                "hue": 91,
                "saturation": 0,
                "lightness": 28,
                "alpha": 0.23922
            }
        },
        "hsla_raw": {
            "value": "hsla(90.96774, 0%, 28.03922%, 0.24)",
            "composition": {
                "hue": 90.96774,
                "saturation": 0,
                "lightness": 28.03922,
                "alpha": 0.23922
            }
        }
    },
    "grayscale_without_alpha": {
        "keyword": "",
        "hex": {
            "value": "#484848",
            "composition": {
                "red": "48",
                "green": "48",
                "blue": "48"
            }
        },
        "rgb": {
            "value": "rgb(72, 72, 72)",
            "composition": {
                "red": 72,
                "green": 72,
                "blue": 72
            }
        },
        "hsl": {
            "value": "hsl(91, 0%, 28%)",
            "composition": {
                "hue": 91,
                "saturation": 0,
                "lightness": 28
            }
        },
        "hsl_raw": {
            "value": "hsl(90.96774, 0%, 28.03922%)",
            "composition": {
                "hue": 90.96774,
                "saturation": 0,
                "lightness": 28.03922
            }
        }
    },
    "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
            }
        }
    }
}