{
  "id": "duotone-image",
  "name": "Duotone Image",
  "category": "effects",
  "tags": [
    "duotone",
    "mix-blend-mode",
    "image filter",
    "brand colors",
    "photo effect",
    "hover"
  ],
  "description": "Maps any photo to two brand colors with blend modes, then shows the original image on hover.",
  "url": "https://copy-css.com/snippets/duotone-image",
  "markdown": "https://copy-css.com/snippets/duotone-image.md",
  "html": "<div class=\"duotone\">\n  <img src=\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 40'%3E%3Crect width='60' height='40' fill='%23bae6fd'/%3E%3Ccircle cx='14' cy='11' r='6' fill='%23fde047'/%3E%3Cpath d='M0 40V30l15-6 15 5 15-7 15 6v12z' fill='%2334d399'/%3E%3Cpath d='M36 31l5-15 5 15zM45 32l4-11 4 11zM8 36l4-12 4 12z' fill='%23047857'/%3E%3C/svg%3E\" alt=\"Green hills and pine trees on a sunny day\" width=\"240\" height=\"160\">\n</div>",
  "css": ".duotone {\n  --light: #fde68a;\n  --dark: #9d174d;\n  position: relative;\n  width: 240px;\n  overflow: hidden;\n  border-radius: 16px;\n  background: var(--light);\n  isolation: isolate;\n}\n\n.duotone img {\n  display: block;\n  width: 100%;\n  height: auto;\n  filter: grayscale(1) contrast(1.1);\n  mix-blend-mode: multiply;\n}\n\n.duotone::after {\n  content: \"\";\n  position: absolute;\n  inset: 0;\n  background: var(--dark);\n  mix-blend-mode: lighten;\n  pointer-events: none;\n  transition: opacity 0.4s ease;\n}\n\n.duotone:hover img {\n  filter: none;\n  mix-blend-mode: normal;\n}\n\n.duotone:hover::after {\n  opacity: 0;\n}\n\n@media (prefers-reduced-motion: reduce) {\n  .duotone::after {\n    transition: none;\n  }\n}",
  "features": [
    "transitions",
    "filters",
    "blend modes",
    "custom properties",
    "reduced-motion support"
  ],
  "customProperties": [
    {
      "name": "--light",
      "value": "#fde68a"
    },
    {
      "name": "--dark",
      "value": "#9d174d"
    }
  ]
}
