TranslateColor(Source: IGxColor): IGxColor;
Source - color that is transformed.
The TranslateColor method translates the specified color in accordance with the palette of the specified color profile.
The color profile is specified in the ICMProfile property. The method returns the color that is used by the devices for displaying the color specified in the Source parameter on using the set color profile.
Executing the example requires the ProPhoto color profile file in the operating system.
Sub UserProc;
Var
ICMMan: IGxICMManager;
Color1, Color2: IGxColor;
Begin
ICMMan := New GxICMManager.Create;
ICMMan.ICMProfile := "ProPhoto";
Color1 := New GxColor.CreateRGB(100, 22, 33);
Color2 := ICMMan.TranslateColor(Color1);
Debug.WriteLine(Initial color: R:" + Color1.R.ToString +
" G:" + Color1.G.ToString +
" B:" + Color1.B.ToString);
Debug.WriteLine(Color after transformation: R:" + Color2.R.ToString +
" G:" + Color2.G.ToString +
" B:" + Color2.B.ToString);
End Sub UserProc;
On executing the example the generated color named Color1 is converted in accordance with the palette of the specified color profile. The R, G and B component values of the initial and converted colors are displayed in the development environment console window.
See also: