How to change the color of the hyperlinks in Dark mode?

Prev Next

Plans supporting the use of custom CSS and JS in knowledge base site

Professional
Business
Enterprise






When using a dark primary color and viewing the Knowledge Base site in Dark mode, hyperlinks may appear partially visible. The primary color remains consistent across Light and Dark modes. To address this, consider changing the hyperlink color.

Solution

You can change the color of hyperlinks in the Dark mode. This helps to avoid partially visible hyperlinks in this mode.

  1. Navigate to Settings () > Knowledge base site > Customize site > Custom CSS & JavaScript in the Knowledge base portal.

  2. From the left navigation pane, click on the CSS tab and paste the following CSS snippet:

body.dark_theme .content_block .content_container .content_block_text a {color: red !important;}
html[data-bs-theme=dark] d360-article-content a {
    color: red !important;
}
  1. Update the desired color in the above snippet.

In the above sample snippet, it is red. You can customize it with your desired color.

  1. Click Save.

Outcome

2_Screenshot_HyperLink_Color_Changes.png