Seized
April 9, 2026, 8:42pm
1
Here is the kode I’m trying to adjust. but my mind is drawing a blank on where I’m going wrong.
$tc(reg,wg(“\[https://raw.githubusercontent.com/lorandcompany/App-Color-Database/main/colors.json\\ ]”, json, “/feed/entry\[content='” + gv(pkg) + "'\]
/following-sibling::entry\[1\]/content/text()“),”\^$", $\[gv(custom\_c\])$
I’m just trying to change color based on the app, if not using a set value from a gv; while displaying some notification text.
Any help would be very appreciated.
Seized
April 9, 2026, 10:24pm
2
I’ve got it change to black,
But for whatever reason it won’t parse the json file to use its specific colors. I’ m grateful the notifications still work.
$tc(reg,wg(“[https://raw.githubusercontent.com/lorandcompany/App-Color-Database/main/colors.json\ ]”, json, “/feed/entry[content=(com.reddit.frontpage)]/following-sibling::entry[1]/content/text()”), “^$”, #FF000000 )$
MaxP
April 10, 2026, 2:41pm
3
The reason it’s turning black is that your formula is failing to find the data and defaulting to #FF000000 . You are using XPath syntax (/feed/entry…) which does not work with JSON files.
For JSON, you must use dot notation and brackets (since package names contain dots).Try this gormula:
$if(ni(0, pkg) != “”, wg(“raw.githubusercontent.com/lorandcompany/App-Color-Database/main/colors.json ”, json, “.['” + ni(0, pkg) + “']”), #FF000000 )$
1 Like