
# Teme

shikiphp vključuje **celoten nabor tem Shiki**: vseh 65 tem VS Code iz
[`tm-themes`](https://github.com/shikijs/textmate-grammars-themes) 1.12.2, nabora, ki ga vključuje Shiki 3.23.0. 44 je temnih in 21 svetlih. Med priljubljenimi ID-ji so
`github-dark`, `github-light`, `nord`, `dracula`, `vitesse-dark`,
`vitesse-light`, `one-dark-pro`, `monokai`, `solarized-dark` ter družini
`catppuccin-*` in `material-theme-*`.

Uporabite eno temo z možnostjo [`theme`](https://shikiphp.inline0.dev/sl/docs/options#theme) ali dve (ali več) z možnostjo [`themes`](https://shikiphp.inline0.dev/sl/docs/options#themes) za izhod s spremenljivkami CSS za svetel/temen način.
Glejte [Začetek](https://shikiphp.inline0.dev/sl/docs/getting-started#dual-themes-light-and-dark).

```php
use Shikiphp\Shikiphp;

echo Shikiphp::codeToHtml('const answer = 42', [
    'lang'   => 'js',
    'themes' => ['light' => 'github-light', 'dark' => 'github-dark'],
]);
```

Če sveženj ID-ja teme ne pozna, sproži `Shikiphp\Exceptions\Highlight` s sporočilom `Unknown theme "…"`.

## Kaj določa tema

Tema določa ospredje in ozadje bloka (zapisano v `<pre>`) ter barvo in slog pisave (ležeče, krepko, podčrtano, prečrtano) vsakega žetona, ki se razrešijo glede na specifičnost izbirnika obsega. Za `lang: 'ansi'` njene barve `terminal.ansi*` postanejo paleta ANSI (glejte [ANSI](https://shikiphp.inline0.dev/sl/docs/ansi)). Če želite prilagoditi posamezne barve brez urejanja teme, uporabite [`colorReplacements`](https://shikiphp.inline0.dev/sl/docs/options#colorreplacements).

## Izpis vključenih tem

Iz PHP:

```php
use Shikiphp\Shikiphp;

$highlighter = Shikiphp::highlighter();

$highlighter->bundledThemes(); // list<string> — ids shipped in the box
$highlighter->loadedThemes();  // list<string> — bundled plus any you registered
```

Ali pa iz ukazne vrstice, po en ID v vsaki vrstici, po abecednem vrstnem redu:

```bash
vendor/bin/shikiphp themes
```

## Katalog

Vrsta je oznaka `light` ali `dark`, ki jo sveženj zabeleži za vsako temo; uporabna je pri izbiri para za možnost `themes`.

| Tema | ID | Vrsta |
| --- | --- | --- |
| Andromeeda | `andromeeda` | temna |
| Aurora X | `aurora-x` | temna |
| Ayu Dark | `ayu-dark` | temna |
| Ayu Light | `ayu-light` | svetla |
| Ayu Mirage | `ayu-mirage` | temna |
| Catppuccin Frappé | `catppuccin-frappe` | temna |
| Catppuccin Latte | `catppuccin-latte` | svetla |
| Catppuccin Macchiato | `catppuccin-macchiato` | temna |
| Catppuccin Mocha | `catppuccin-mocha` | temna |
| Dark Plus | `dark-plus` | temna |
| Dracula Theme | `dracula` | temna |
| Dracula Theme Soft | `dracula-soft` | temna |
| Everforest Dark | `everforest-dark` | temna |
| Everforest Light | `everforest-light` | svetla |
| GitHub Dark | `github-dark` | temna |
| GitHub Dark Default | `github-dark-default` | temna |
| GitHub Dark Dimmed | `github-dark-dimmed` | temna |
| GitHub Dark High Contrast | `github-dark-high-contrast` | temna |
| GitHub Light | `github-light` | svetla |
| GitHub Light Default | `github-light-default` | svetla |
| GitHub Light High Contrast | `github-light-high-contrast` | svetla |
| Gruvbox Dark Hard | `gruvbox-dark-hard` | temna |
| Gruvbox Dark Medium | `gruvbox-dark-medium` | temna |
| Gruvbox Dark Soft | `gruvbox-dark-soft` | temna |
| Gruvbox Light Hard | `gruvbox-light-hard` | svetla |
| Gruvbox Light Medium | `gruvbox-light-medium` | svetla |
| Gruvbox Light Soft | `gruvbox-light-soft` | svetla |
| Horizon | `horizon` | temna |
| Horizon Bright | `horizon-bright` | svetla |
| Houston | `houston` | temna |
| Kanagawa Dragon | `kanagawa-dragon` | temna |
| Kanagawa Lotus | `kanagawa-lotus` | svetla |
| Kanagawa Wave | `kanagawa-wave` | temna |
| LaserWave | `laserwave` | temna |
| Light Plus | `light-plus` | svetla |
| Material Theme | `material-theme` | temna |
| Material Theme Darker | `material-theme-darker` | temna |
| Material Theme Lighter | `material-theme-lighter` | svetla |
| Material Theme Ocean | `material-theme-ocean` | temna |
| Material Theme Palenight | `material-theme-palenight` | temna |
| Min Dark | `min-dark` | temna |
| Min Light | `min-light` | svetla |
| Monokai | `monokai` | temna |
| Night Owl | `night-owl` | temna |
| Night Owl Light | `night-owl-light` | svetla |
| Nord | `nord` | temna |
| One Dark Pro | `one-dark-pro` | temna |
| One Light | `one-light` | svetla |
| Plastic | `plastic` | temna |
| Poimandres | `poimandres` | temna |
| Red | `red` | temna |
| Rosé Pine | `rose-pine` | temna |
| Rosé Pine Dawn | `rose-pine-dawn` | svetla |
| Rosé Pine Moon | `rose-pine-moon` | temna |
| Slack Dark | `slack-dark` | temna |
| Slack Ochin | `slack-ochin` | svetla |
| Snazzy Light | `snazzy-light` | svetla |
| Solarized Dark | `solarized-dark` | temna |
| Solarized Light | `solarized-light` | svetla |
| Synthwave '84 | `synthwave-84` | temna |
| Tokyo Night | `tokyo-night` | temna |
| Vesper | `vesper` | temna |
| Vitesse Black | `vitesse-black` | temna |
| Vitesse Dark | `vitesse-dark` | temna |
| Vitesse Light | `vitesse-light` | svetla |

## Dodajanje lastnih

Registrirajte temo po meri VS Code JSON z `loadTheme`. Glejte
[Jeziki in teme po meri](https://shikiphp.inline0.dev/sl/docs/custom-languages-themes).
