In that case, you might define some custom underline functions, e.g.
#let myuline(fill: black, it) = {
set text(fill: fill)
math.underline(it)
}
Then you can have
$ myuline(fill: #blue, A + B) = myuline(fill: #red, C + D) $
In that case, you might define some custom underline functions, e.g.
#let myuline(fill: black, it) = {
set text(fill: fill)
math.underline(it)
}
Then you can have
$ myuline(fill: #blue, A + B) = myuline(fill: #red, C + D) $