Skip to content
HALOWERK

Bildwerk

dark mode check

Renders the HTML (or a fetched page with up to 3 inlined stylesheets) twice in a fresh sandboxed headless Chrome context, scripts disabled and all network requests blocked: once with prefers-color-scheme: light and once with dark. For every visible text element it composites the computed text colour (with opacity) over the background colours of the elements painted beneath it (hit-testing with elementsFromPoint, so positioned overlays count; ancestors as fallback) and the canvas colour of.

POST https://bild.halowerk.com/v1/dark-mode-check

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
htmlstringNoHTML of the page with inline or embedded CSS. External resources are not loaded. Give html or url.
urlstringNoPublic http(s) page, fetched once (robots.txt respected); up to 3 linked stylesheets are fetched and inlined.
levelstringNoWCAG contrast level.
viewport_widthintegerNo
viewport_heightintegerNo
max_issuesintegerNo
screenshotbooleanNoReturn a JPEG of the dark-mode viewport.
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "html": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2000000,
      "description": "HTML of the page with inline or embedded CSS. External resources are not loaded. Give html or url."
    },
    "url": {
      "type": "string",
      "format": "uri",
      "pattern": "^https?://",
      "maxLength": 2048,
      "description": "Public http(s) page, fetched once (robots.txt respected); up to 3 linked stylesheets are fetched and inlined."
    },
    "level": {
      "type": "string",
      "enum": [
        "AA",
        "AAA"
      ],
      "default": "AA",
      "description": "WCAG contrast level."
    },
    "viewport_width": {
      "type": "integer",
      "minimum": 320,
      "maximum": 1920,
      "default": 1280
    },
    "viewport_height": {
      "type": "integer",
      "minimum": 320,
      "maximum": 1600,
      "default": 800
    },
    "max_issues": {
      "type": "integer",
      "minimum": 1,
      "maximum": 200,
      "default": 30
    },
    "screenshot": {
      "type": "boolean",
      "default": false,
      "description": "Return a JPEG of the dark-mode viewport."
    }
  }
}

Open original schema

Published input example

{
  "html": "<!doctype html><html><head><style>body{background:#fff;color:#222}@media (prefers-color-scheme:dark){body{background:#121212;color:#e0e0e0}a{color:#1a0dab}}</style></head><body><h1>Pricing</h1><p>Plans start at 5 EUR. <a href=\"#faq\">Read the FAQ</a></p></body></html>"
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub →