ShowRemapHueDlg example for Delphi

procedure TForm1.ShowRemapHueDlg1Click(Sender: TObject); 
var
   i: L_INT; 
   nRet: L_INT; 
begin
   LEADDlgColor1.DlgFlags:= DLG_REMAPHUE_SHOW_PREVIEW Or
                             DLG_REMAPHUE_SHOW_TOOL_ZOOMLEVEL; 

   LEADDlgColor1.LEADImage:= LEADImage1; 
   LEADDlgColor1.LEADDlgService:= LEADDlgService1; 
   nRet:= LEADDlgColor1.ShowRemapHueDlg ( Self ); 
   if ( nRet = SUCCESS_DLG_OK ) then
   begin
      for i:= 0 to LEADDlgColor1.RemapHueTableSize -1 do
      begin
         LEADImage1.MaskTable[i]:= LEADDlgColor1.RemapHueMaskTable [i]; 
         LEADImage1.HTable[i]:= LEADDlgColor1.RemapHueHTable [i]; 
         LEADImage1.STable[i]:= LEADDlgColor1.RemapHueSTable [i]; 
         LEADImage1.VTable[i]:= LEADDlgColor1.RemapHueVTable [i]; 
      end; 
      LEADImage1.RemapHue ( True, True, False, False ); 
   end; 
end;