Skip to content
Back to search

dithercn

Add dithers to anything in your app. A dither engine and agent skill for shadcn.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/opencoredev--dithercn/badge.svg)](/listings/opencoredev--dithercn)

HTML

<a href="/listings/opencoredev--dithercn"><img src="/api/listings/opencoredev--dithercn/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

From a project that uses shadcn/ui, Tailwind CSS v4 and React 19:

npx shadcn@latest add https://dithercn.dev/r/dithercn-skill.json

This adds the engine in `lib/dither/`, the skill in `.agents/skills/dithercn/` and `.claude/skills/dithercn/`, and the `--dither-*` CSS variables. Any example installs the same way, for example `https://dithercn.dev/r/dither-gradient.json`.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 104 lines
  1. <p align="center">
  2. <img alt="dithercn: dither primitives your agent builds with. A dither engine and an agent skill for shadcn/ui, shown with a dithered globe, bar chart, gauge, aurora, ridgelines, text and orb." src=".github/assets/readme-banner.png" width="100%" />
  3. </p>
  4. <p align="center">
  5. <a href="https://github.com/opencoredev/dithercn/stargazers"><img alt="GitHub stars" src="https://shieldcn.dev/github/opencoredev/dithercn/stars.svg?variant=branded&mode=dark" /></a>
  6. <a href="https://x.com/leodev"><img alt="Follow @leodev on X" src="https://shieldcn.dev/x/follow/leodev.svg?variant=branded&mode=dark" /></a>
  7. </p>
  8. dithercn gives your coding agent the primitives to add dithers to anything in your app: a dither engine and a skill that teaches it. Ask for a background, a chart, a loading state or a dithered photo, and your agent builds it in your shadcn theme.
  9. It installs with the shadcn CLI as plain source you own, and works with Claude Code, Codex, Cursor and any agent that reads skills.
  10. [Read the installation guide](<content/docs/(root)/installation.mdx>) · [Write your own dither](content/docs/engine/write-your-own.mdx)
  11. - A dither engine (`lib/dither`): a WebGL shader for anything that moves, SVG and CSS fills for static shapes, image dithering, and PNG, SVG and CSS export
  12. - An agent skill that teaches your agent to write fields, place a dither on a landing page or dashboard, and check it in light, dark and reduced motion
  13. - 63 example components across backgrounds, charts, interface, text and images, each a starting point to install and edit
  14. - Colours from your theme: the dither ink and paper map to your `--primary` and `--background`, and switch with light and dark mode
  15. - Motion, resizing, offscreen pausing and reduced motion handled by the engine
  16. ## Install
  17. From a project that uses shadcn/ui, Tailwind CSS v4 and React 19:
  18. ```bash
  19. npx shadcn@latest add https://dithercn.dev/r/dithercn-skill.json
  20. ```
  21. This adds the engine in `lib/dither/`, the skill in `.agents/skills/dithercn/` and `.claude/skills/dithercn/`, and the `--dither-*` CSS variables. Any example installs the same way, for example `https://dithercn.dev/r/dither-gradient.json`.
  22. ## Usage
  23. Ask your agent for the dither you want, in plain words:
  24. ```text
  25. Add a slow dithered aurora behind the hero headline, in our brand colour,
  26. and keep the headline readable.
  27. ```
  28. The skill sends the agent to the engine, the closest example and the checks it runs before it's done. To write one by hand, a dither is a GLSL field that returns a tone from 0 (paper) to 1 (ink):
  29. ```tsx
  30. "use client";
  31. import { DitherShader } from "@/lib/dither";
  32. const FIELD = `
  33. float field(vec2 uv, vec2 res, float t) {
  34. vec2 p = vec2(uv.x * res.x / res.y, uv.y);
  35. return fbm(p * 2.5 + vec2(t * 0.03, 0.0)) * smoothstep(0.0, 0.6, uv.y);
  36. }
  37. `;
  38. export const Clouds = () => (
  39. <DitherShader className="absolute inset-0" field={FIELD} stillTime={4} />
  40. );
  41. ```
  42. ## For agents
  43. The skill is the main surface: `/.well-known/agent-skills/index.json` lists it and `/.well-known/agent-skills/dithercn/SKILL.md` serves it. The site also serves `/llms.txt`, `/llms-full.txt`, a Markdown version of every docs page (append `.md`), an API catalog at `/.well-known/api-catalog` and an OpenAPI description at `/openapi.json`.
  44. ## Develop
  45. ```bash
  46. pnpm install
  47. pnpm dev
  48. ```
  49. Then open http://localhost:3000. Other scripts:
  50. - `pnpm build` builds the registry, then the site
  51. - `pnpm registry:build` renders the skill into `.generated/`, merges `registry/*.json` into `registry.json` (both generated, gitignored), checks it, and writes the items to `public/r/`
  52. - `pnpm check` runs formatting and lint checks (ultracite)
  53. - `pnpm typecheck` runs TypeScript
  54. Set `SITE_URL` to the public origin when deploying. Without it, a Vercel production build uses the project's production URL, a Vercel preview uses its deployment URL, and anywhere else falls back to `http://localhost:3000`.
  55. ## Project structure
  56. ```
  57. ├── content/docs/ # Docs (MDX). (root) is "Get started", engine/ the engine guides, examples/ the overview, the rest example groups
  58. ├── skills/dithercn/ # The agent skill (SKILL.md and references), served and shipped as dithercn-skill
  59. ├── components/dithercn/ # Shipped components, one file each
  60. ├── lib/dither/ # dither-core, the shipped engine
  61. ├── examples/ # Docs demos (site only)
  62. ├── registry/ # Registry items: base.json plus one fragment per group
  63. ├── scripts/ # build-registry.ts, generate-blue-noise.ts
  64. ├── public/r/ # Built registry items (generated by pnpm registry:build)
  65. ├── app/ # Next.js app: site, docs, OG images, agent routes
  66. ├── components/ # Site components (ui/ holds the shadcn primitives)
  67. └── lib/ # Docs source, catalog, agent discovery
  68. ```
  69. ## Credits
  70. [Dither Kit](https://www.tripwire.sh/dither-kit) by Boring Software set the quality bar for dithercn, and several of our ideas come straight from it: the gradient, dotted, hatched and solid fills, bloom under fills, a named colour palette that works in light and dark, a chart crosshair whose tooltip glides as you scrub, legend hover and click-to-lock, live knobs in the docs, generative avatars, and buttons whose dither thickens on hover and press. We wrote our own code and look, but the ideas are theirs. Dither Kit in turn credits [EvilCharts](https://evilcharts.com) by legions-developer for the dithered chart style, so thanks to them too.
  71. Docs run on [Fumadocs](https://fumadocs.dev), and icons come from [Hugeicons](https://hugeicons.com).
  72. ## License
  73. [MIT](./LICENSE)

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.