SF Symbols 4 and newer support some icons that render differently depending on a “variable value” between 0..1 (0-100%). see screenshots below.
When creating a JSON encoded result, e.g. for a menu bar item, you can define {”text”: “some text”, “sf_symbol_name”: “…”}. There is currently no (documented) way to set a variable value.
Could this be added in one of the releases?

