Based on the code below how can I change the colors of certain words individually.
Purpose: To learn how to change colors in Arcade element.
// Create a variable that the FeatureSet of intersecting feature attributes
var building = FeatureSetByName($map, "BuildingFootprints_Clip")
var intersectLayer = Intersects(building, $feature)
// This variable will be repeated multiple times in the code
var popup = '<h2>Building</h2>';
for (var f in intersectLayer){
popup += `<b>Area:</b> ${f.AREAFT} <br><br>
<b>Length:</b> ${f.LENFT} <br><br>
<b>ID:</b> ${f.ID} <br><br>
`
}
Desired output:
Area: Value
Length: Value
ID: Value
Solved! Go to Solution.
This will make Area red
for (var f in intersectLayer){
popup += `<b><font color = "#ff0000">Area</font>:</b> ${f.AREAFT} <br><br>
<b>Length:</b> ${f.LENFT} <br><br>
<b>ID:</b> ${f.ID} <br><br>`
}
Here is a good resource: https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/color-pop-ups/
This will make Area red
for (var f in intersectLayer){
popup += `<b><font color = "#ff0000">Area</font>:</b> ${f.AREAFT} <br><br>
<b>Length:</b> ${f.LENFT} <br><br>
<b>ID:</b> ${f.ID} <br><br>`
}
Thank you Ken 🙂 so can <font color = "HEX code"> also applied on "Length", "ID" and the heading "<h2>Buidling<h2>?