anchor.diff:      luminance := Max(0, Min(luminance, 1));
       Result := HLSToRGB(H, luminance, S);
     end;
  +
  +{$ELSE}
  +
  +  function GetLuminance(aColor: TColor): double;
  +  var
  +    H, S, L: Single;
  +  begin
  +    RGBtoHSL(ColorToRgb(aColor), H, S, L);
  +    Result := L;
  +  end;
  +
  +  function SetLuminance(aColor: TColor; luminance: double): TColor;
  +  var
  +    H, S, L: Single;
  +  begin
  +    RGBtoHSL(ColorToRgb(aColor), H, S, L);
  +    luminance := Max(0, Min(luminance, 1));
  +    Result := HSLtoRGB(H, S, luminance);
  +  end;
  +
  +{$ENDIF}
  +
   
     function DarkerColor(aColor: TColor; percent: Byte): TColor;
     var
  
positive.code:   {$ENDIF}
  end;
  
  
    procedure RGBToHLS(aColor: TColor; var H, L, S: Double);
    var
      HW, SW, LW: Word;
  
negative.code:       thumbnail.Canvas.Brush.Color:= clWhite;
        r := Rect(0, 0, thumbnail.Width, thumbnail.Height);
        thumbnail.Canvas.FillRect(r);
        {$IFDEF FPC}
        thumbnail.Canvas.AntialiasingMode := amON;
        {$ENDIF}
        thumbnail.Canvas.StretchDraw(r, sourcePicture.Graphic);
        thumbnail.SaveToFile(aThumbnailFile);
      finally
  