How to change the background color of sharepoint list gallery view background

Garvit Chauhan 5 Reputation points
2024-06-16T08:51:31.9466667+00:00

I am using sharepoint list with 5 rows. I created a new view to format the cards with JSON. BUT there is static background color which is white. I am unable to find any solution to change it without using SPFX and admin rights.

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

2 answers

Sort by: Most helpful
  1. Haoyan Xue_MSFT 21,816 Reputation points Microsoft Vendor
    2024-06-17T02:02:38.4433333+00:00

    Hi @Garvit Chauhan ,

    Thank you for posting in this community.

    Yes, you can customize the background color in the gallery view of a SharePoint list to any color using JSON.

    Here are steps:

    1. Open the Gallery view in Microsoft Lists
    2. Select on the name of the view displayed on the command bar > Select Format curret view
    3. Select Edit card
    4. Sort and show/hide content
    5. Select Advance mode steps to open advance mode
    6. Add the following code to the containing the class divsp-card-subContainer
    "style": { 
    	"background-color": "*** HTML color code or name ***" 
    },
    

    User's image

    Reference:https://pnp.github.io/blog/post/how-to-change-the-background-color-of-cards-in-the-gallery-view/

    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.


    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.

    0 comments No comments

  2. Haoyan Xue_MSFT 21,816 Reputation points Microsoft Vendor
    2024-06-18T01:29:15.1133333+00:00

    Hi @Garvit Chauhan ,

    Unfortunately, there is No SharePoint OOTB way to change the complete background color of list view. You can only change the background color of item rows/tiles using JSON Formatting.

    Thank you for your understanding!


    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.