{
  "$schema": "../../schema.json",
  "id": "halftone-cmyk",
  "type": "background",
  "title": "Halftone Cmyk",
  "summary": "CMYK halftone printing effect applied to images with customizable dot patterns and ink colors for each channel (Cyan, Magenta, Yellow, Black).",
  "tags": [
    "background",
    "halftone-cmyk",
    "gentle",
    "light",
    "image"
  ],
  "version": "1.0.0",
  "license": "MIT",
  "params": [
    {
      "name": "fit",
      "type": "string",
      "default": "cover",
      "description": "How to fit the rendered shader into the canvas dimensions (0 = none, 1 = contain, 2 = cover)",
      "group": "advanced"
    },
    {
      "name": "colorBack",
      "type": "color",
      "default": "#E9E4D8",
      "description": "background color behind the effect",
      "group": "main"
    },
    {
      "name": "colorC",
      "type": "color",
      "default": "#8EA3AD",
      "description": "Cyan ink color in RGBA",
      "group": "advanced"
    },
    {
      "name": "colorM",
      "type": "color",
      "default": "#B07D73",
      "description": "Magenta ink color in RGBA",
      "group": "advanced"
    },
    {
      "name": "colorY",
      "type": "color",
      "default": "#C9A65A",
      "description": "Yellow ink color in RGBA",
      "group": "advanced"
    },
    {
      "name": "colorK",
      "type": "color",
      "default": "#141414",
      "description": "Black ink color in RGBA",
      "group": "advanced"
    },
    {
      "name": "size",
      "type": "number",
      "default": 0.2,
      "description": "dot or pattern size",
      "min": 0,
      "max": 1,
      "step": 0.005,
      "group": "main"
    },
    {
      "name": "contrast",
      "type": "number",
      "default": 1,
      "description": "contrast",
      "min": 0,
      "max": 2,
      "step": 0.01,
      "group": "main"
    },
    {
      "name": "softness",
      "type": "number",
      "default": 1,
      "description": "edge softness",
      "min": 0,
      "max": 1,
      "step": 0.005,
      "group": "main"
    },
    {
      "name": "grainSize",
      "type": "number",
      "default": 0.5,
      "description": "grain size",
      "min": 0,
      "max": 1,
      "step": 0.005,
      "group": "advanced"
    },
    {
      "name": "gridNoise",
      "type": "number",
      "default": 0.2,
      "description": "Strength of smooth noise applied to both dot positions and color sampling, positions only with sharp type",
      "min": 0,
      "max": 1,
      "step": 0.005,
      "group": "advanced"
    },
    {
      "name": "type",
      "type": "enum",
      "default": "ink",
      "options": [
        "dots",
        "ink",
        "sharp"
      ],
      "description": "variant",
      "group": "advanced"
    }
  ],
  "install": {
    "kind": "shader-set",
    "entry": {
      "shader": "HalftoneCmyk",
      "props": {
        "fit": "cover",
        "colorBack": "#E9E4D8",
        "colorC": "#8EA3AD",
        "colorM": "#B07D73",
        "colorY": "#C9A65A",
        "colorK": "#141414",
        "size": 0.2,
        "contrast": 1,
        "softness": 1,
        "grainSize": 0.5,
        "gridNoise": 0.2,
        "type": "ink"
      },
      "image": "assets/materials/material-a.jpg",
      "motion": {
        "param": "size",
        "from": 0.16,
        "to": 0.26
      }
    }
  },
  "files": [
    {
      "path": "brand/assets/materials/material-a.jpg",
      "url": "https://paper-motion.vercel.app/files/material-a.jpg",
      "from": "registry/_assets/materials/material-a.jpg"
    }
  ],
  "requires": {
    "engine": ">=0.2.0"
  },
  "usage": "import { loadBrand } from 'paper-motion/brand';\n\nconst B = await loadBrand();\n// a full-frame element <div id=\"bg\"></div> behind everything:\nB.shader(s, '#bg', 'halftone-cmyk');",
  "notes": [
    "Paper shader `HalftoneCmyk` (still).",
    "Uses an image (installed to brand/assets/materials/); swap `image` for your own picture or texture.",
    "Breathes on `size` from 0.16 to 0.26 so a still shader stays alive."
  ],
  "preview": {
    "poster": "previews/halftone-cmyk.jpg"
  },
  "colors": [
    "#e9e4d8"
  ],
  "mode": "light",
  "motion": "gentle",
  "mood": [
    "editorial",
    "raw"
  ],
  "when": [
    "a field that breathes behind a title or a card",
    "a light editorial piece",
    "you have a photo or a logo to run through it"
  ]
}