VariantDark Mode

Dark Mode

Request dark-friendly logos with ?variant=dark and handle fallbacks cleanly.

Dark mode

Use variant=dark to request a logo that works on dark backgrounds.

Quick take: add ?variant=dark to get a dark-compatible logo, and keep fallback=true for safe defaults.

variantstring

Use dark to request the dark variant.

Not every domain has a dark variant. Use fallback=false if you want a hard 404 when missing.

curl "https://api.brandql.com/logo/stripe.com?variant=dark"

How it works

We look for dark-friendly assets across multiple sources (favicons, Open Graph images, manifest icons). If a dark variant exists, you’ll get it. If it doesn’t, we return the default logo unless you opt out of fallback.

Strict mode

If you only want a result when a dark variant actually exists, set fallback=false. If no dark variant is available, the response is a 404.

See Fallback Parameter.

Dark mode in HTML

Use a picture element to serve the dark logo only when the user has dark mode enabled:

<picture>
  <source
    media="(prefers-color-scheme: dark)"
    srcset="https://api.brandql.com/logo/stripe.com?variant=dark"
  />
  <img
    src="https://api.brandql.com/logo/stripe.com"
    alt="Stripe"
  />
</picture>

Notes

  • Not every domain has a dark variant.
  • If you prefer a transparent background, use variant=transparent instead. See Variant Parameter.