---
title: "WCAG contrast ratio between two colors"
method: GET
path: "/color/contrast"
tags: ["Color"]
---

# WCAG contrast ratio between two colors

`GET /color/contrast`

## Request

- Base URL: `https://abundanceapis.com`
- URL: `https://abundanceapis.com/color/contrast`
- Auth: none declared

Computes the WCAG 2.x contrast ratio and AA/AAA pass-fail for normal and large text.

## Query parameters

- `foreground` string, required
- `background` string, required

## Other responses

- `400`: Bad request

---

[API](https://skmtc.dev/abundanceapis/apis/web-toolbox.md) · [All operations](https://skmtc.dev/abundanceapis/apis/web-toolbox/llms.txt) · [OpenAPI document](https://skmtc.dev/abundanceapis/apis/web-toolbox/revisions/ada2893fef43?raw)
