Skip to content
Cuelark UI

Hover the icon or press Play. Suggested motion: blink. Pick another to preview it and update the animated code:

Heroicons · HiColorSwatch

Color Swatch icon

A free color swatch icon from Heroicons, ready for React. Use it static or animated: both versions are below, copy-paste or one shadcn command away. Sized in em and colored by currentColor.

License
MIT license
Project
github.com
Install with shadcn
npx shadcn@latest add https://ui.cuelark.com/r/icons/heroicons/color-swatch.json
components/icons/heroicons-color-swatch.tsx
import * as React from "react";

/**
 * Color Swatch from Heroicons (https://github.com/tailwindlabs/heroicons), MIT.
 * Via Cuelark UI: ui.cuelark.com/icons/heroicons/color-swatch. Sized in em, colored by currentColor.
 */
export function HiColorSwatchIcon(props: React.SVGProps<SVGSVGElement>) {
  return (
    <svg
      aria-hidden="true"
      viewBox="0 0 20 20"
      aria-hidden="true"
      stroke="currentColor"
      fill="currentColor"
      strokeWidth="0"
      width="1em"
      height="1em"
      xmlns="http://www.w3.org/2000/svg"
      {...props}
    >
      <path
        fillRule="evenodd"
        d="M4 2a2 2 0 00-2 2v11a3 3 0 106 0V4a2 2 0 00-2-2H4zm1 14a1 1 0 100-2 1 1 0 000 2zm5-1.757l4.9-4.9a2 2 0 000-2.828L13.485 5.1a2 2 0 00-2.828 0L10 5.757v8.486zM16 18H9.071l6-6H16a2 2 0 012 2v2a2 2 0 01-2 2z"
        clipRule="evenodd"
      />
    </svg>
  );
}
With react-icons
import { HiColorSwatch } from "react-icons/hi";

export function Example() {
  return <HiColorSwatch className="size-5" />;
}
color-swatch.svg
<svg
  viewBox="0 0 20 20"
  aria-hidden="true"
  stroke="currentColor"
  fill="currentColor"
  stroke-width="0"
  width="1em"
  height="1em"
  xmlns="http://www.w3.org/2000/svg"
>
  <path
    fill-rule="evenodd"
    d="M4 2a2 2 0 00-2 2v11a3 3 0 106 0V4a2 2 0 00-2-2H4zm1 14a1 1 0 100-2 1 1 0 000 2zm5-1.757l4.9-4.9a2 2 0 000-2.828L13.485 5.1a2 2 0 00-2.828 0L10 5.757v8.486zM16 18H9.071l6-6H16a2 2 0 012 2v2a2 2 0 01-2 2z"
    clip-rule="evenodd"
  />
</svg>
Attribution
"Color Swatch" icon from Heroicons (https://github.com/tailwindlabs/heroicons), licensed under MIT license.

Related icons:

Color Swatch icon in other sets