# Farvekontrasttjek

> Tjek kontrastforholdet for en tekstfarve på en baggrund i forhold til WCAG AA og AAA for normal og stor tekst, med en live prøve. Gratis.

Free tool by Orkosi. Page: https://orkosi.com/tools/contrast-checker?lang=da

Lysegrå tekst på hvid ser elegant ud, men er svær at læse for personer med trætte øjne eller på en telefon i solen. Tjek et farvepar mod tilgængelighedsstandarden, før det går live.

1. Indtast tekstfarven og baggrundsfarven.
2. Tryk på Tjek.
3. Se kontrastforholdet og hvilke WCAG-niveauer det består.

## Input

| Field | Type | Required | What it is |
| --- | --- | --- | --- |
| `foreground` | text | yes | Tekstfarve. |
| `background` | text | yes | Baggrundsfarve. |

## Example

Input:

```json
{
  "foreground": "#6B7280",
  "background": "#FFFFFF"
}
```

Result:

```json
{
  "ratio": 4.83,
  "ratio_text": "4.83:1",
  "aa_normal": "Bestået",
  "aa_large": "Bestået",
  "aaa_normal": "Ikke bestået",
  "aaa_large": "Bestået",
  "verdict": "Består AA for al tekst.",
  "preview": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 140\" width=\"640\" height=\"140\" role=\"img\" aria-label=\"Kontrastforhåndsvisning\"><rect width=\"640\" height=\"140\" fill=\"#FFFFFF\"/><text x=\"32\" y=\"62\" font-family=\"system-ui,sans-serif\" font-size=\"30\" font-weight=\"700\" fill=\"#6B7280\">Stor tekstprøve</text><text x=\"32\" y=\"102\" font-family=\"system-ui,sans-serif\" font-size=\"16\" fill=\"#6B7280\">Brødtek…"
}
```

## Run it

It needs a free Orkosi account, nothing else. No credits are used.

- **A person**: open the page, enter an e-mail once, use the tool.
- **Claude or ChatGPT**: add the Orkosi connector `https://orkosi.com/api/v1/public/mcp` and sign in, or create the free account on the sign-in page. Then call `orkosi_run_free_tool` with `{ "tool": "contrast-checker", "input": { … } }`.
- **Any agent or program that can make an HTTP request**:

  1. Once, create the account: `POST https://orkosi.com/api/v1/public/signup` with `{ "name": "…", "email": "…", "terms_accepted": true }` and no key. Ask the person for the e-mail and their agreement to the terms first. The answer carries `data.api_key`, shown once.
  2. Run the tool:

```bash
curl -X POST https://orkosi.com/api/v1/public/tools/contrast-checker/run \
  -H "Authorization: Bearer $ORKOSI_API_KEY" -H "Content-Type: application/json" \
  -d '{"input":{"foreground":"#6B7280","background":"#FFFFFF"}}'
```

The answer is `{ "data": { "tool": "…", "result": { … } } }`. A call without a key is answered 401 with the signup steps as data.

## Questions

**Hvilket kontrastforhold kræver WCAG?**

Niveau AA kræver 4,5:1 for normal tekst og 3:1 for stor tekst. Niveau AAA kræver 7:1 og 4,5:1.

**Hvad tæller som stor tekst?**

24 pixels eller derover, eller 19 pixels eller derover med fed skrift, 18 og 14 punkter.

**Gælder det for knapper og ikoner?**

Ja. Grænsefladekomponenter og betydningsfuld grafik skal have mindst 3:1 mod det, der ligger ved siden af dem.

All free tools: https://orkosi.com/tools.md
