Enum RenderingIntent
How a color conversion handles colors the target cannot show, with the ICC numbering (0 to 3).
public enum RenderingIntent
Fields
AbsoluteColorimetric = 3Keep in-gamut colors exact, without adapting the white point (paper white shows as it measures).
Perceptual = 0Compress the whole gamut to fit, keeping relations between colors; uses the profile's perceptual tables.
RelativeColorimetric = 1Keep in-gamut colors exact relative to each white point and clip the rest.
Saturation = 2Keep 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);