anchor.diff:    AppStyleError: TecSyntaxFormat = nil;
   
   procedure DoInitTheme(var D: TAppTheme);
  -procedure DoLoadTheme(const fn: string; var D: TAppTheme; IsThemeUI: boolean);
  +procedure DoLoadTheme(const AFileName: string; var D: TAppTheme; IsThemeUI: boolean);
   procedure DoSaveTheme(const fn: string; const D: TAppTheme; IsThemeUI: boolean);
   function GetAppColor(id: TAppThemeColorId): TColor; inline;
   function GetAppStyleFromName(const SName: string): TecSyntaxFormat;
  
positive.code:   ATButtons,
    at__jsonconf;
  
  procedure DoLoadTheme(const fn: string; var D: TAppTheme; IsThemeUI: boolean);
  var
    c: TJsonConfig;
    //
    procedure DoVal(var Val: TColor; const id: string);
    var
      s: string;
      len: integer;
    begin
      s:= c.GetValue(id, '?');
      if s='?' then
      begin
        MsgLogConsole(Format(msgErrorInTheme, [ExtractFileName(fn), id]));
        exit;
      end;
      if s='' then
  
negative.code:   iColor: TAppThemeColorId;
    i: integer;
  begin
    if not FileExists(AFileName) then
    begin
      MsgLogConsole(Format(msgCannotFindData, [AFileName]));
      exit;
    end;
  
    cfg:= TJsonConfig.Create(nil);
    try
      try
        cfg.Filename:= AFileName;
      except
        MsgBadConfig(AFileName);
        Exit
      end;
  
      if IsThemeUI then
      begin
        for iColor:= Low(iColor) to High(iColor) do
          ReadColorValue(D.Colors[iColor].color, D.Colors[iColor].name);
      end
      else
      begin
        for i:= 0 to d.Styles.Count-1 do
        begin
          st:= TecSyntaxFormat(d.Styles[i]);
          if not DoLoadLexerStyleFromFile_JsonTheme(st, cfg, 'Lex_'+st.DisplayName) then
            MsgLogConsole(Format(msgErrorInTheme,
              [ExtractFileName(AFileName), 'Lex_'+st.DisplayName]));
        end;
      end;
    finally
      cfg.Free;
    end;
  end;
  
  