Aug 07 2019 07:59 AM - edited Aug 07 2019 10:13 AM
Edit: This is on Sharepoint Online using modern experience.
I have custom JSON in a list to color code the row based on one column. The only colors I have been able to make work are the colors from the Office UI Fabric. I want to make the colors a little more transparent. Here is my current code:
{
"$schema": "<a href="https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json" target="_blank">https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json</a>",
"additionalRowClass": "=if([$Status] == 'Status1', 'ms-bgColor-greenLight',
if([$Status] == 'Status2', 'ms-bgColor-neutralQuaternaryAlt',
if([$Status] == 'Status3', 'ms-bgColor-red ms-fontColor-black, false)))"
}
I tried adding the following before "additionalRowClass" ... and changing the Status1 if statement to 'greenLight', but that didn't work.
"greenLight": [16, 124, 16, 0.2],
I'm no pro in JSON, but I have read through all these Schemas and I can't find and reference or definition to colors what so ever.
Thank you for any help you can provide.
Aug 08 2019 03:05 AM
Take a look at this section of the column formatting documentation. It looks like you can add a "style" property where you can add properties like "color" or (presumably) "background-color"