Forum Discussion
JSON code: How to change Font Color to Black?
- Oct 02, 2022
sangbui Use this JSON code:
{ "elmType": "div", "attributes": { "class": "" }, "style": { "width": "99%", "border-top-width": "0px", "border-bottom-width": "1px", "border-left-width": "0px", "border-right-width": "0px", "border-style": "solid", "margin-bottom": "16px" }, "children": [ { "elmType": "div", "style": { "display": "flex", "box-sizing": "border-box", "align-items": "left" }, "children": [ { "elmType": "div", "attributes": { "iconName": "link", "class": "ms-fontSize-11 ms-fontWeight-regular", "title": "Details" }, "style": { "flex": "none", "padding": "0px", "padding-left": "0px", "height": "32px" } } ] }, { "elmType": "div", "attributes": { "class": "ms-fontWeight-bold ms-fontSize-11" }, "style": { "box-sizing": "border-box", "width": "100%", "text-align": "left", "padding": "21px 12px", "overflow": "hidden" }, "children": [ { "elmType": "a", "style": { "color": "black" }, "txtContent": "In case you register for more than one person, please click and fill in this form then attach it to Attachments field ", "attributes": { "href": "https://jabil-my.sharepoint.com/:x:/p/sang_bui1127/EZAox0Ik7wZMvmPk2aFSzzUBGMUr0ChjRAqa8G2zH_cXZw?e=...", "target": "_blank" } } ] } ] }
Output:
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
sangbui Use this JSON code:
{
"elmType": "div",
"attributes": {
"class": ""
},
"style": {
"width": "99%",
"border-top-width": "0px",
"border-bottom-width": "1px",
"border-left-width": "0px",
"border-right-width": "0px",
"border-style": "solid",
"margin-bottom": "16px"
},
"children": [
{
"elmType": "div",
"style": {
"display": "flex",
"box-sizing": "border-box",
"align-items": "left"
},
"children": [
{
"elmType": "div",
"attributes": {
"iconName": "link",
"class": "ms-fontSize-11 ms-fontWeight-regular",
"title": "Details"
},
"style": {
"flex": "none",
"padding": "0px",
"padding-left": "0px",
"height": "32px"
}
}
]
},
{
"elmType": "div",
"attributes": {
"class": "ms-fontWeight-bold ms-fontSize-11"
},
"style": {
"box-sizing": "border-box",
"width": "100%",
"text-align": "left",
"padding": "21px 12px",
"overflow": "hidden"
},
"children": [
{
"elmType": "a",
"style": {
"color": "black"
},
"txtContent": "In case you register for more than one person, please click and fill in this form then attach it to Attachments field ",
"attributes": {
"href": "https://jabil-my.sharepoint.com/:x:/p/sang_bui1127/EZAox0Ik7wZMvmPk2aFSzzUBGMUr0ChjRAqa8G2zH_cXZw?e=...",
"target": "_blank"
}
}
]
}
]
}
Output:
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
How would I change the font color to blue?
{
"debugmode": "true",
"elmType": "div",
"attributes": {
"class": "ms-borderColor-neutralTertiary"
},
"style": {
"width": "99%",
"border-top-width": "0px",
"border-bottom-width": "1px",
"border-left-width": "0px",
"border-right-width": "0px",
"border-style": "solid",
"margin-bottom": "16px"
},
"children": [
{
"elmType": "div",
"style": {
"display": "flex",
"box-sizing": "border-box",
"align-items": "center"
},
"children": [
{
"elmType": "div",
"attributes": {
"iconName": "SHIELD",
"class": "ms-fontSize-42 ms-fontWeight-regular ms-fontColor-#0000ff",
"title": "Your icon"
},
"style": {
"flex": "none",
"padding": "0px",
"padding-left": "0px",
"height": "36px"
}
}
]
},
{
"elmType": "div",
"attributes": {
"class": "ms-fontColor-neutralSecondary ms-fontWeight-bold ms-fontSize-24"
},
"style": {
"box-sizing": "border-box",
"width": "100%",
"text-align": "left",
"padding": "21px 12px",
"overflow": "hidden"
},
"children": [
{
"elmType": "div",
"txtContent": {
"operator": "+",
"operands": [
"LE CASE: ",
"[$Category]"
]
},
"style": {
"height": "24px"
}
}
]
}
]
}
- ganeshsanapOct 03, 2023MVP
dayranz If you are trying to change the color of Category column to blue, use the JSON like this:
{ "debugmode": "true", "elmType": "div", "attributes": { "class": "ms-borderColor-neutralTertiary" }, "style": { "width": "99%", "border-top-width": "0px", "border-bottom-width": "1px", "border-left-width": "0px", "border-right-width": "0px", "border-style": "solid", "margin-bottom": "16px" }, "children": [ { "elmType": "div", "style": { "display": "flex", "box-sizing": "border-box", "align-items": "center" }, "children": [ { "elmType": "div", "attributes": { "iconName": "SHIELD", "class": "ms-fontSize-42 ms-fontWeight-regular ms-fontColor-#0000ff", "title": "Your icon" }, "style": { "flex": "none", "padding": "0px", "padding-left": "0px", "height": "36px" } } ] }, { "elmType": "div", "attributes": { "class": "ms-fontColor-neutralSecondary ms-fontWeight-bold ms-fontSize-24" }, "style": { "box-sizing": "border-box", "width": "100%", "text-align": "left", "padding": "21px 12px", "overflow": "hidden", "color": "blue" }, "children": [ { "elmType": "div", "txtContent": { "operator": "+", "operands": [ "LE CASE: ", "[$Category]" ] }, "style": { "height": "24px", "color": "blue" } } ] } ] }
Please consider giving a Like if my post helped you in any way.