Demo catalogue. A made-up brand, products and prices to show how ShadeWise works on a product page. Not a real shop.

Add ShadeWise to your store in 60 seconds

ShadeWise is one script tag and one element. The shopper takes a selfie, the widget measures skin tone, and it returns a verdict with the reasons: good match, close match, poor match, or can't tell, retake.

1. Paste this on a product page

<script type="module" src="https://shadewise-lac.vercel.app/widget/index.js"></script>

<shadewise-widget
  product-id="demo-05"
  catalogue-src="https://shadewise-lac.vercel.app/api/catalogue"
  compare="demo-04,demo-10">
</shadewise-widget>

Replace YOUR-SHADEWISE-HOST with the address where ShadeWise is deployed. The widget finds its own files from the script's address. If your store is on a different site than ShadeWise, that site's address must be on the server's allowed-origins list.

2. Attributes

Attributes of the shadewise-widget element
AttributeNeededWhat it does
product-idYesThe id of the product on this page. It is looked up in the catalogue; if it is not there, the widget uses swatch instead.
catalogue-srcRecommendedA web address that returns your shades as JSON. Relative addresses are read from the ShadeWise host, not your page. Without it, only the main shade is judged.
compareNoUp to two more product ids from the catalogue to rank against this one, separated by commas.
swatchNoA fallback shade colour such as #b88f76, used only when the product is not in the catalogue.

The catalogue address returns this shape. Prices are whole rupees. Entries with a bad id, colour or price are ignored.

{ "items": [
  { "id": "demo-05", "name": "Skin Tint Foundation", "shade": "Caramel 05",
    "hex": "#A57656", "priceInr": 999 }
] }

3. Make it match your brand

The widget lives in its own shadow tree, so your page's CSS cannot break it. Colours are set with four CSS variables on the element: --sw-accent, --sw-text, --sw-bg and --sw-border.

<shadewise-widget
  product-id="demo-05"
  style="--sw-accent:#6d28d9; --sw-border:#c4b5fd; --sw-bg:#faf5ff; --sw-text:#2e1065">
</shadewise-widget>

Live example with those colours:

4. What the widget sends

5. Limits