Hi,
Please have a try with the JSON below, it works in my end.
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"attributes": {
"class": "=if(@currentField <=@now ,'sp-field-severity--severeWarning',if(@currentField <=(@now+7776000000) ,'sp-field-severity--warning','sp-field-severity--good'))"
},
"children": [
{
"elmType": "span",
"style": {
"display": "inline-block",
"padding": "0 4px"
},
"attributes": {
"iconName": "=if(@currentField <=@now ,'ErrorBadge',if(@currentField <=(@now+7776000000) ,'Error','Forward'))"
}
},
{
"elmType": "span",
"txtContent": "@currentField"
}
]
}
Update :
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": "@currentField",
"style": {
"color": "=if(@currentField <=@now ,'#ff0000',if(@currentField <=(@now+7776000000) ,'#F4D03F','#58FF33'))"
}
}
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": "@currentField",
"style": {
"background-color": "=if(@currentField <=@now ,'#ff0000',if(@currentField <=(@now+7776000000) ,'#F4D03F','#58FF33'))"
}
}
If the answer is helpful, please click Accept Answer and upvote it.
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.