## Table of Contents

- [screenshot › codeScheme](#screenshot-%E2%80%BA-codescheme)
  - [CLI Microlink API example](#cli-microlink-api-example)
  - [cURL Microlink API example](#curl-microlink-api-example)
  - [JavaScript Microlink API example](#javascript-microlink-api-example)
  - [Python Microlink API example](#python-microlink-api-example)
  - [Ruby Microlink API example](#ruby-microlink-api-example)
  - [PHP Microlink API example](#php-microlink-api-example)
  - [Golang Microlink API example](#golang-microlink-api-example)
- [Theme previews](#theme-previews)
  - [Combo themes](#combo-themes)
  - [Single themes](#single-themes)

---

[](https://microlink.io/docs/api/getting-started/overview)

[API](https://microlink.io/docs/api/getting-started/overview)

[](https://microlink.io/docs/guides)

GUIDES

[](https://microlink.io/docs/mql/getting-started/overview)

MQL

[](https://microlink.io/docs/sdk/getting-started/overview)

SDK

[](https://microlink.io/docs/cards/getting-started/overview)

CARDS

## screenshot › codeScheme

Type: \<string\>\
Default: 'atom-dark'

It enables code syntax highlighting to beautify HTML markup under JSON/Text content type over the target [url](https://microlink.io/docs/api/parameters/url).

The following examples show how to use the Microlink API with CLI, cURL, JavaScript, Python, Ruby, PHP & Golang, targeting 'https://emojipedia-api.vercel.app' URL with 'screenshot' API parameter:

### CLI Microlink API example

``` bash
microlink https://emojipedia-api.vercel.app&screenshot.codeScheme=automad-dark&screenshot.styles='span { line-height: 2 }'
```

### cURL Microlink API example

``` bash
curl -G "https://api.microlink.io" \
  -d "url=https://emojipedia-api.vercel.app" \
  -d "screenshot.codeScheme=automad-dark" \
  -d "screenshot.styles=span%20%7B%20line-height%3A%202%20%7D"
```

### JavaScript Microlink API example

``` javascript
import mql from '@microlink/mql'

const { data } = await mql('https://emojipedia-api.vercel.app', {
  screenshot: {
    codeScheme: "automad-dark",
    styles: [
      "span { line-height: 2 }"
    ]
  }
})
```

### Python Microlink API example

``` python
import requests

url = "https://api.microlink.io/"

querystring = {
    "url": "https://emojipedia-api.vercel.app",
    "screenshot.codeScheme": "automad-dark",
    "screenshot.styles": "span { line-height: 2 }"
}

response = requests.get(url, params=querystring)

print(response.json())
```

### Ruby Microlink API example

``` ruby
require 'uri'
require 'net/http'

base_url = "https://api.microlink.io/"

params = {
  url: "https://emojipedia-api.vercel.app",
  screenshot.codeScheme: "automad-dark",
  screenshot.styles: "span { line-height: 2 }"
}

uri = URI(base_url)
uri.query = URI.encode_www_form(params)

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Get.new(uri)
response = http.request(request)

puts response.body
```

### PHP Microlink API example

``` php
<?php

$baseUrl = "https://api.microlink.io/";

$params = [
    "url" => "https://emojipedia-api.vercel.app",
    "screenshot.codeScheme" => "automad-dark",
    "screenshot.styles" => "span { line-height: 2 }"
];

$query = http_build_query($params);
$url = $baseUrl . '?' . $query;

$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => $url,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "GET"
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
    echo "cURL Error #: " . $err;
} else {
    echo $response;
}
```

### Golang Microlink API example

``` bash
package main

import (
    "fmt"
    "net/http"
    "net/url"
    "io"
)

func main() {
    baseURL := "https://api.microlink.io"

    u, err := url.Parse(baseURL)
    if err != nil {
        panic(err)
    }
    q := u.Query()
    q.Set("url", "https://emojipedia-api.vercel.app")
    q.Set("screenshot.codeScheme", "automad-dark")
    q.Set("screenshot.styles", "span { line-height: 2 }")
    u.RawQuery = q.Encode()

    req, err := http.NewRequest("GET", u.String(), nil)
    if err != nil {
        panic(err)
    }

    client := &http.Client{}
    resp, err := client.Do(req)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    body, err := io.ReadAll(resp.Body)
    if err != nil {
        panic(err)
    }

    fmt.Println(string(body))
}
```

``` javascript
import mql from '@microlink/mql'

const { data } = await mql('https://emojipedia-api.vercel.app', {

  screenshot: {

    codeScheme: "automad-dark",

    styles: [

      "span { line-height: 2 }"

    ]

  }

})
```

The theme can be defined as:

- An [](https://automadcms.github.io/automad-prism-themes/)

  automad-prism-themes

  identifier (e.g., 'github').

- A remote URL (e.g., 'https://unpkg.com/prism-theme-night-owl').

You can also customize any theme passing your own [styles](https://microlink.io/docs/api/parameters/styles) rules.

## Theme previews

### Combo themes

Combo themes bundle two coordinated styles under one name: a light variant and a dark variant. The light variant is the default.

To keep mode switching explicit and app-controlled, combo themes ignore `prefers-color-scheme`. Dark styles are activated when any of these selectors match:

- `html[class*="dark-"]` enables dark mode whenever the `html` element has a class containing `"dark-"`.
- `html[class*="-dark"]` enables dark mode whenever the `html` element has a class containing `"-dark"`.
- `.dark` enables dark mode for any element nested inside a container with the `"dark"` class.

- [](https://github.com/automadcms/automad-prism-themes/blob/master/light-dark.json)

  Automad

  Light / Dark

- [](https://github.com/automadcms/automad-prism-themes/blob/master/light-dark.json)

  Atom One

  Light / Dark

- [](https://github.com/automadcms/automad-prism-themes/blob/master/light-dark.json)

  Ayu

  Light / Dark

- [](https://github.com/automadcms/automad-prism-themes/blob/master/light-dark.json)

  Ayu Mirage

  Light / Dark

- [](https://github.com/automadcms/automad-prism-themes/blob/master/light-dark.json)

  Bearded Arc Blueberry

  Light / Dark

- [](https://github.com/automadcms/automad-prism-themes/blob/master/light-dark.json)

  Boola

  Light / Dark

- [](https://github.com/automadcms/automad-prism-themes/blob/master/light-dark.json)

  Catppuccin Frappe

  Light / Dark

- [](https://github.com/automadcms/automad-prism-themes/blob/master/light-dark.json)

  Catppuccin Macchiato

  Light / Dark

- [](https://github.com/automadcms/automad-prism-themes/blob/master/light-dark.json)

  Catppuccin Mocha

  Light / Dark

- [](https://github.com/automadcms/automad-prism-themes/blob/master/light-dark.json)

  Coldark

  Light / Dark

- [](https://github.com/automadcms/automad-prism-themes/blob/master/light-dark.json)

  GitHub

  Light / Dark

- [](https://github.com/automadcms/automad-prism-themes/blob/master/light-dark.json)

  Gruvbox

  Light / Dark

- [](https://github.com/automadcms/automad-prism-themes/blob/master/light-dark.json)

  Night Owl

  Light / Dark

- [](https://github.com/automadcms/automad-prism-themes/blob/master/light-dark.json)

  Rose Pine

  Light / Dark

- [](https://github.com/automadcms/automad-prism-themes/blob/master/light-dark.json)

  Serendipity Midnight

  Light / Dark

- [](https://github.com/automadcms/automad-prism-themes/blob/master/light-dark.json)

  Serendipity Sunset

  Light / Dark

- [](https://github.com/automadcms/automad-prism-themes/blob/master/light-dark.json)

  Tailwind Moon Blue

  Light / Dark

- [](https://github.com/automadcms/automad-prism-themes/blob/master/light-dark.json)

  Tokyo Night

  Light / Dark

- [](https://github.com/automadcms/automad-prism-themes/blob/master/light-dark.json)

  Tokyo Night Storm

  Light / Dark

- [](https://github.com/automadcms/automad-prism-themes/blob/master/light-dark.json)

  Verdandi

  Light / Dark

### Single themes

Use single themes when you want one fixed code style, regardless of light/dark mode. Set `screenshot.codeScheme` to any identifier below (for example, `'gruvbox-dark'` or `'night-owl'`).

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-atom-dark.css)

  Atom Dark

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-atom-one-dark.css)

  Atom One Dark

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-atom-one-light.css)

  Atom One Light

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-aura-dark.css)

  Aura Dark

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-automad-dark.css)

  Automad Dark

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-automad-light.css)

  Automad Light

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-ayu-dark.css)

  Ayu Dark

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-ayu-light.css)

  Ayu Light

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-ayu-mirage.css)

  Ayu Mirage

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-bearded-arc-blueberry.css)

  Bearded Arc Blueberry

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-bearded-vivid-light.css)

  Bearded Vivid Light

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-boola-dark.css)

  Boola Dark

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-boola-light.css)

  Boola Light

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-catppuccin-frappe.css)

  Catppuccin Frappe

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-catppuccin-latte.css)

  Catppuccin Latte

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-catppuccin-macchiato.css)

  Catppuccin Macchiato

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-catppuccin-mocha.css)

  Catppuccin Mocha

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-coldark-cold.css)

  Coldark Cold

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-coldark-dark.css)

  Coldark Dark

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-dark-frost.css)

  Dark Frost

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-dark-space.css)

  Dark Space

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-dracula.css)

  Dracula

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-duotone-dark.css)

  Duotone Dark

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-duotone-earth.css)

  Duotone Earth

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-duotone-forest.css)

  Duotone Forest

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-duotone-light.css)

  Duotone Light

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-duotone-sea.css)

  Duotone Sea

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-duotone-space.css)

  Duotone Space

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-github-dark.css)

  Github Dark

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-github-light.css)

  Github Light

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-gruvbox-dark.css)

  Gruvbox Dark

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-gruvbox-light.css)

  Gruvbox Light

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-laserwave.css)

  Laserwave

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-night-owl-light.css)

  Night Owl Light

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-night-owl.css)

  Night Owl

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-nightfall.css)

  Nightfall

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-nord.css)

  Nord

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-panda.css)

  Panda

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-poimandres.css)

  Poimandres

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-rose-pine-dawn.css)

  Rose Pine Dawn

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-rose-pine.css)

  Rose Pine

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-sakura-sun.css)

  Sakura Sun

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-sea-shells-dark.css)

  Sea Shells Dark

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-serendipity-midnight.css)

  Serendipity Midnight

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-serendipity-morning.css)

  Serendipity Morning

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-serendipity-sunset.css)

  Serendipity Sunset

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-shades-of-purple.css)

  Shades Of Purple

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-solarized-dark-atom.css)

  Solarized Dark Atom

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-synthwave84.css)

  Synthwave84

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-tailwind-ice.css)

  Tailwind Ice

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-tailwind-moon-blue.css)

  Tailwind Moon Blue

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-tokyo-night-light.css)

  Tokyo Night Light

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-tokyo-night-storm.css)

  Tokyo Night Storm

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-tokyo-night.css)

  Tokyo Night

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-verdandi-alter.css)

  Verdandi Alter

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-verdandi.css)

  Verdandi

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-violet-dream.css)

  Violet Dream

- [](https://github.com/automadcms/automad-prism-themes/blob/master/themes/prism-vsc-dark-plus.css)

  Vsc Dark Plus