If I understand your question correctly, it can be done, but you need two steps:
#first: get the variable:
src_expression = parse('$.result.src_color')
src_match = src_expression.find(mapping)
#second: get the target
expression = parse(f'$.rules.color_degree.{src_match[0].value}.color')
match = expression.find(mapping)
if match:
print(match[0].value)
Output is 2
.
EDIT:
I don't know why someone would want to do it in one step, but it's possible:
parse(f'$.rules.color_degree.{parse("$.result.src_color").find(mapping)[0].value}.color').find(mapping)[0].value
Same output.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…