Table of Contents

Enum RenderingIntent

Namespace
Egami.Colors
Assembly
Egami.dll

How a color conversion handles colors the target cannot show, with the ICC numbering (0 to 3).

public enum RenderingIntent

Fields

AbsoluteColorimetric = 3

Keep in-gamut colors exact, without adapting the white point (paper white shows as it measures).

Perceptual = 0

Compress the whole gamut to fit, keeping relations between colors; uses the profile's perceptual tables.

RelativeColorimetric = 1

Keep in-gamut colors exact relative to each white point and clip the rest.

Saturation = 2

Keep colors vivid rather than exact; uses the profile's saturation tables.

Examples

// IccData reads a profile's header and tags; it never throws, and says what was wrong with a damaged one.
IccData icc = IccData.Parse(bytes);
Console.WriteLine($"{icc.Description}: version {icc.Version}, {icc.ProfileClass}, {icc.DataSpace} to {icc.ConnectionSpace}, damaged: {icc.IsDamaged}");
foreach (IccTag tag in icc.Tags)
{
    Console.WriteLine($"  {tag.Signature} ({tag.Type}), {tag.Data.Length} bytes");
}

// ColorProfile.FromIcc makes an encoding from it: a matrix profile gets its primaries and curve, so an ICC profile written
// for Display P3 is equivalent to the built-in.
ColorProfile profile = ColorProfile.FromIcc(icc);
bool isP3 = profile.IsEquivalentTo(ColorProfile.DisplayP3);