How do I remove link formatting in Calc?

How do I remove the blue text (and white background) for text links in LibreOffice Calc? Instead I would like to have the text and background be whatever colour I choose. I still want the hyperlinks to be clickable, I just do not want the default colours to be used for the text links. Note that I am aware of the ability to change the default text colours for links via Tools > Options > Appearance, however this changes every link to the same colour, whereas I would like to have different colour text with different colour backgrounds throughout my spreadsheet. Thanks.

Also asked at How to change the format of the hyperlink in Calc?. And related: libreoffice calc: formatting hyperlinks - Unix & Linux Stack Exchange. But my answer suggests a different approach.

Use the HYPERLINK function instead of a field.

formatted hyperlink

For easier maintenance of formatting, modify the Hyperlink cell style and apply it. In your case, you would need to create multiple styles. If none have the same formatting, then styles may not be worth it.

Sample file.ods

Excel has a 256 character limit on equations so this will break for long urls.

@dementedhedgehog: The question is about LO Calc, not MS Excel. Anyway, for such long URLs, you could put the address in a different cell and then use a cell reference in the HYPERLINK formula.

@“Jim K” I am aware that the question is about LO Calc. It’s just that there’s a fairly high probability that @stew23 will be handing the thing to someone on windows at some point based on my experience. So interoperability is often important.