# Farvekonvertering

> Konvertér en farve mellem HEX, RGB, HSL og CMYK online. Indsæt et vilkårligt format, kopiér de andre, og se, hvilken tekstfarve der er lettest at læse på den.

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

Designeren sender en HEX-kode, CSS kræver HSL, og trykkeriet beder om CMYK. Indsæt farven i det format, du har, og kopiér det, du skal bruge.

1. Indtast en farve: #0052FF, rgb(0, 82, 255) eller hsl(221, 100%, 50%).
2. Tryk på Konvertér.
3. Kopiér det format, du skal bruge.

## Input

| Field | Type | Required | What it is |
| --- | --- | --- | --- |
| `color` | text | yes | Farve. |

## Example

Input:

```json
{
  "color": "#0052FF"
}
```

Result:

```json
{
  "hex": "#0052FF",
  "rgb": "rgb(0, 82, 255)",
  "hsl": "hsl(221, 100%, 50%)",
  "cmyk": "cmyk(100%, 68%, 0%, 0%)",
  "css_variable": "--color: #0052FF;",
  "best_text_color": "#FFFFFF",
  "preview": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 96\" width=\"640\" height=\"96\" role=\"img\" aria-label=\"Farveforhåndsvisning\"><rect x=\"0\" y=\"0\" width=\"640.5\" height=\"96\" fill=\"#0052FF\"/><text x=\"320\" y=\"53\" text-anchor=\"middle\" font-family=\"system-ui,sans-serif\" font-size=\"13\" fill=\"#FFFFFF\">#0052FF</text></svg>"
}
```

## 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": "color-converter", "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/color-converter/run \
  -H "Authorization: Bearer $ORKOSI_API_KEY" -H "Content-Type: application/json" \
  -d '{"input":{"color":"#0052FF"}}'
```

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

## Questions

**Hvilke formater kan jeg indsætte?**

HEX med tre eller seks cifre, med eller uden #, rgb() og hsl() med kommaer eller mellemrum mellem tallene.

**Er CMYK-værdien korrekt til tryk?**

Det er den matematiske konvertering. Et trykkeri konverterer med en farveprofil til deres trykpresse og papir, så bed om et prøvetryk af brandfarverne.

**Hvad er den bedste tekstfarve?**

Hvid eller næsten sort, alt efter hvilken der har det højeste kontrastforhold mod din farve efter WCAG-formlen.

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