Change to alternate icon using Int value with > or < condition.

Hi I have made a bar button that shows me the percentage output of my CPU. I'm looking to have the icon change from the standard (white) version to red when the appleScript return value is greater than or equal to 90.
I currently have the standard icon in icon slot 1 and the red icon in slot 2 however I just can't seem to figure out how to call the alternative icon when the value is greater than (I've tried >90) but doesn't seem to work. I have managed to get it to the alternative if I make the value exactly at 90 but anything above this and it returns to the icon 1, could this feature be added?

I understand that I can do this over two scripts - 1 showing the icon with a conditional return and 1 showing the Int value but I was just hoping to keep it to 1 script.

Instead of returning a plain string value you can return a json. This can also contain base64 encoded images (or a path to an image) and custom colors:

"{\"text\":\"newTitle\",
\"icon_data\": \"base64_icon_data\", 
\"icon_path\":\"path_to_new_icon\", 
\"background_color\": \"255,85,100,255\",
\"font_color\": \"100,200,100,255\",
\"font_size\": 10}"

Thanks Andreas!

This sounds exactly what i'm looking for, however i'm having a little trouble (sorry i'm new to apple scripts) but how would return the JSON since I've tried copying and pasting the code above at the end of the script and adjusting code however it keeps throwing errors?
Do you have any examples of JSON returns and does it effect the way the appleScript is written?

Here is a version of my current code, however, I don't think it's as efficient as it can be.

set cpuReturn to (do shell script "iostat -c2 -d -C -n0 | tail -n1 | awk '{print $0+$1}'") as text
set cpuPerc to cpuReturn & "%" as text
if cpuReturn > 89 then
	tell application "BetterTouchTool"
		update_touch_bar_widget "113C2EDE-83CA-4984-91DF-F3D510472D91" text cpuPerc icon_path "/Users/david/BTT/Icons/CPUR.png"
	end tell
else
	tell application "BetterTouchTool"
		update_touch_bar_widget "113C2EDE-83CA-4984-91DF-F3D510472D91" text cpuPerc icon_path "/Users/david/BTT/Icons/CPUW.png"
	end tell
end if

Thanks in advanced and for making an awesome application!