Forum Discussion
Stephen-14853
Sep 08, 2026Tin Contributor
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...
- 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" }
virendrak
Sep 09, 2026Steel Contributor
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"
}
Stephen-14853
Sep 10, 2026Tin Contributor
That pretty much works for me, it looks a lot cleaner. Thank you!