How to change the font color of Hub navigation

MJohnson 0 Reputation points
2024-06-03T18:06:20.2933333+00:00

We are using a custom theme for our SharePoint Modern site online. The Hub navigation for our site is very light grey and not great for accessibility. What property in the custom theme schema is related to the font color for Hub navigation?

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,300 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Yanli Jiang - MSFT 24,356 Reputation points Microsoft Vendor
    2024-06-04T08:58:37.7+00:00

    Hi @MJohnson ,

    There is currently no way to change the font color. You can change the hub navigation bar color instead.

    Go to site settings of hub site>Change the look>under the header section>Background> select a theme color to change the background color of your site header.

    177754-image.png

    Note that the background of the site header(include the hub navigation bar)will depend on your site theme:

    177707-image.png

    If you don't want to depend on the theme, we can add the modern script web part, insert css code to change the backgroud-color of the hub navigation bar:

    Copy

    <style>  
    .root-42  
    {  
        background-color: #B2E23B !important;  
    }  
    </style>  
    

    178783-image.png

    Then republish the page to check the result:

    178756-image.png


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.