How to add severe weather icon to widget?

Does anyone know how I can add a severe weather icon similar to one as in the second screenshot? Example yellow exclamation triangle for advisories, orange for watches and red for warnings?

$wi(code)$ and $wf(code)$ can detect severe weather like tornado and hurricane. You can use the output of this formula to display any image or icon you want using a simple “if” statement.