title: Change hyperlink colors in Google Apps Script for Spreadsheets
body: <p><strong>EDIT:</strong> I have just spent an obscene amount of time trying to change the color for hyperlinks in Google Sheets, but it seems to be impossible.</p>
  <p>I thought that by changing the <a href="https://developers.google.com/apps-script/reference/spreadsheet/rich-text-value" rel="nofollow noreferrer">RichTextValue</a> it could be possible to alter the TextStyle of hyperlinks. But it <a href="https://stackoverflow.com/questions/46429645/making-bold-only-a-part-of-a-google-spreadsheets-cell">doesn't seem to be possible to change only part of a cell's style</a>.</p>
  <p><strong>Question:</strong> Am I right that it's impossible to change the style/color of hyperlinks in Google Sheets?</p>
  <hr />
  <h3>Original question</h3>
  <p>I want to change the default hyperlink color in a given Google Spreadsheet.</p>
  <p>This is my attempt of coding a <a href="https://developers.google.com/apps-script/guides/bound" rel="nofollow noreferrer">Container-Bound script</a>:</p>
  <pre><code>function changeLinkColor() {
      var app = SpreadsheetApp;
      var spreadsheet = app.getActiveSpreadsheet();
      var linkColor = app.newColor().setRgbColor(&quot;#B4EBF7&quot;).build();
      spreadsheet.getSpreadsheetTheme().setConcreteColor(app.ThemeColorType.HYPERLINK, linkColor);
  }
  </code></pre>
  <p>I can see that it apparently changes  <code>Logger.log(spreadsheet.getSpreadsheetTheme().getConcreteColor(app.ThemeColorType.HYPERLINK)</code> to the desired value, but it makes no difference in my spreadsheet, hyperlinks are still blue.</p>
  <p>I believe, however, that hyperlink colors in themes only work for reports, this is why it is making no difference for links inside cells.</p>