Forum Discussion

Stephen-14853's avatar
Stephen-14853
Tin Contributor
Sep 08, 2026
Solved

JSON formatting to change background color of ENTIRE column of list?

Hi, I'm trying to use JSON formatting to change the color of an entire column of a SharePoint list, and I can't figure it out. Setting the background-color style property appears to only affect the b...
  • virendrak's avatar
    Sep 09, 2026

    No, unfortunately column JSON formatting cannot color the entire physical SharePoint column. 

    This usually fills most of the cell, but it still won't color the actual grid area between rows.

    You can get closer to a full-cell appearance by expanding the element:

    {
      "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
      "elmType": "div",
      "style": {
        "background-color": "#4B0082",
        "color": "white",
        "width": "100%",
        "height": "100%",
        "padding": "8px",
        "box-sizing": "border-box"
      },
      "txtContent": "@currentField"
    }