Color profiles

AgX reads the color profile embedded in an input file to interpret its colors, and writes a color profile into every output file to label the result. This page explains what those profiles do, why they're necessary, and why AgX picks a specific open-source profile for output rather than the better-known vendor reference profiles.

If you want to look up the underlying color spaces or matrices, see the color spaces explanation.

What an embedded color profile does

A color profile (an ICC profile, named for the International Color Consortium that standardizes the format) is a small chunk of data inside an image file that names the color space the pixel values live in. Pixel value (255, 0, 0) means a different shade of red depending on the color space — moderately saturated in sRGB, much more vivid in Display P3. Without a profile, a viewer has to guess which interpretation applies.

Most viewers default-guess sRGB, which matches AgX's output most of the time. But profile-aware tools (Photoshop, color-managed browsers, professional viewers on wide-gamut displays) honor the embedded profile when one is present. Embedding the right profile turns an implicit guess into an explicit statement.

Reading the profile on input

The same ambiguity applies when AgX opens your photo. A JPEG straight from a camera set to Adobe RGB, or a 16-bit TIFF exported from Lightroom in ProPhoto RGB, carries an embedded profile that says "these pixel values are Adobe RGB" (or ProPhoto, or Display P3). If AgX ignored that and assumed sRGB, every saturated color would land in the wrong place — greens and reds pulled inward, the whole image subtly desaturated and hue-shifted.

So AgX reads the embedded profile and converts the image into its internal working space accordingly, preserving the colors the file actually describes. Adobe RGB, ProPhoto RGB, Display P3, and explicitly-tagged sRGB inputs are all interpreted correctly. A file with no embedded profile is assumed to be sRGB — the safe, overwhelmingly-common default for untagged images.

Choosing the delivery gamut

Every image AgX produces is tagged with the color space the pixels actually live in, so viewers and professional tools render it correctly without guessing. By default that space is sRGB — the safe, universal choice that every screen, printer, and application understands.

When you're delivering to a wide-gamut display or a workflow where the next tool (Photoshop, a RIP, another editor) will handle the full gamut, sRGB clips any color that sits outside its triangle. Display P3, which covers roughly 25% more of visible color than sRGB, is the standard choice for modern consumer devices — iPhones, recent MacBooks, and most premium monitors since 2015 can display it. Adobe RGB is wider still in the green-cyan region, and has long been the choice for print workflows and stock photography.

AgX encodes the pixels into the chosen gamut and embeds the matching ICC profile — sRGB, Display P3, or Adobe RGB — so the embedded profile names the color space the pixels actually live in. The default sRGB output is byte-identical to what AgX has always produced. The gamut choice is made when the file is written; the internal editing math is unaffected. See the CLI reference for the --output-gamut flag.

What AgX embeds

AgX embeds an ICC profile in every JPEG, PNG, and TIFF output that names the output gamut. For the default sRGB output, that is an sRGB v4 ICC profile; for Display P3 or Adobe RGB output, the matching v4 profile is embedded instead.

v4 is the modern ICC spec (the v2 spec dates to 1998). Every contemporary tool — macOS Preview, Photoshop, Lightroom, Safari, Chrome, Firefox, GIMP — handles v4 correctly. AgX's blobs are compact parametric-curve representations under 1 KB each, small enough to be invisible against typical photo file sizes.

Why an open-source profile

The math behind sRGB is in an ISO standard, but the binary ICC files that encode that math are themselves copyrighted as data — similar to how a font file is copyrightable even if the underlying typeface design is not. Shipping an ICC profile from an unclear-license source exposes downstream users of AgX (which is MIT/Apache-2.0 licensed) to licensing ambiguity.

The original sRGB ICC profile, distributed by HP, Microsoft, and the ICC consortium, has always carried vague terms ("free to use" without a formal license). The official Display P3 profile comes from Apple. Adobe RGB is actively copyrighted by Adobe.

The open-source color-management community responded by publishing clean-license alternatives. AgX takes the cleanest possible approach: it synthesizes its own ICC profiles from primaries and standard transfer curves using the lcms2 color-management library (MIT-licensed). The generated bytes inherit MIT cleanly, and the provenance — the same math as every other conforming profile for those color spaces, generated by a well-known library — is fully auditable. This approach covers all three supported output gamuts: sRGB, Display P3, and Adobe RGB.

What this means for you

For most users on a typical sRGB workflow, nothing changes — the default output is sRGB, and most viewers were already guessing sRGB. The embedded profile turns that guess into an explicit statement, which matters most in profile-aware professional tools and on wide-gamut displays.

If your display is wide-gamut (Display P3 or Adobe RGB) and your editing workflow supports it, choosing a wider output gamut at export preserves colors that sRGB would clip. Which gamut to choose depends on your delivery target: Display P3 for digital (web, video, most screen-based workflows); Adobe RGB for print and stock photography. When in doubt, sRGB is the most compatible choice.

See also

  • Color spaces — the working space the embedded profile points back to.
  • Architecture — where metadata bytes sit relative to pixel logic.