Guides
Colours and variants
Light, dark and accent versions are generated from one drawing.
Static drawings use three colour tokens (fill, keyline and accent), which the generator swaps for each variant. Animated families use the same palette at runtime; the brand family displays the supplied image instead of recolouring it.
| Variant | Fill | Keyline | Use on |
|---|---|---|---|
light |
near-black #111111 |
white | light pages |
dark |
white | near-black | dark pages |
accent |
your colour | white #FFFFFF or near-black #111111, whichever contrasts more |
brand moments |
The keyline helps distinguish a cursor from its surroundings, but no variant guarantees visibility on every background. Check your choice against the actual page, including images.
Accent colour
- In the
lightanddarkvariants the accent colours only small details (badges, cores). - In the
accentvariant the accent becomes the fill, while accent details take the keyline colour. The palette picks whichever of white or near-black contrasts more with the fill, and rejects fill–keyline contrast below 3:1. This internal contrast check does not guarantee contrast against the page background. The gallery shows the ratio live.
npx cursor-static dot --variant accent --accent "#E0115F" --out public/cursors
Why colours are baked in
Browsers can’t read CSS variables inside a cursor image, so Static variants are generated ahead of time (by the gallery or the CLI). Animated cursors use runtime colours and can switch with cursor?.setColors('dark'). This does not recolour a brand image. Omitting the accent resets it to the default #2F6BFF.
Following the site theme
Static: generate both variants and switch stylesheets with media:
<link rel="stylesheet" href="/cursors/bold-arrow-light.css" media="(prefers-color-scheme: light)">
<link rel="stylesheet" href="/cursors/bold-arrow-dark.css" media="(prefers-color-scheme: dark)">
Animated: call setColors when your theme changes.