Advanced

Colour accuracy and ICC profiles

How NSS handles colour profiles and what to expect with wide-gamut images.

What is an ICC profile?

An ICC (International Colour Consortium) profile is metadata embedded in an image file that describes the colour space it was captured in. The most common profile is sRGB, which covers the colours most monitors can display. Professional cameras, iPhones, and many modern monitors also support wider colour spaces like Display P3 (which covers ~25% more colours than sRGB).

Without reading the ICC profile, a wide-gamut image can look washed out or over-saturated when displayed or edited in an app that doesn't know the colour space.

How NSS handles colour profiles

  1. Detection: NSS reads the ICC profile from the raw file bytes before decoding
  2. Preservation: The profile is stored and attached to the exported file
  3. Warning: If a non-sRGB profile is detected, a notice is shown in the editor
  4. Correct decoding: Images are decoded with colorSpaceConversion: 'none' to prevent the browser from silently converting colours

The AI inference runs on the raw pixel data, and the ICC profile is reattached at export. Your colours are not modified.

Wide-gamut images (Display P3, AdobeRGB)

If you're photographing with an iPhone in its default mode, your photos are likely Display P3. NSS:

  1. Detects the P3 profile
  2. Shows a notice: "Wide-gamut image detected (Display P3)"
  3. Processes the image without converting colours
  4. Exports with the original P3 profile preserved

When you open this file in Photoshop or Figma (both P3-aware), the colours will look correct. If you open it in a browser or tool that doesn't support P3, it may look slightly different.

Converting to sRGB

NSS does not convert colour spaces automatically — that's a deliberate choice. Colour space conversion involves trade-offs (gamut clipping, rendering intent) that you should control.

If you need an sRGB export for maximum compatibility:

  1. Export the PNG from NSS with the original profile
  2. Open in Photoshop
  3. Edit → Convert to Profile → sRGB IEC61966-2.1
  4. Save/export from Photoshop

Or, if you're shooting on iPhone: in Camera settings, you can capture in sRGB instead of P3 by disabling HDR and Photo formats → Most Compatible.

Colour spill and decontamination

Colour accuracy issues at edges are usually caused by colour spill (background colour bleeding into subject edges) rather than ICC profile issues. If you see colour shifts near edges, use Decontaminate in Edge Refinement — it operates in Lab colour space and corrects spill without affecting the overall colour profile.

Related