"Invisible" segments use style="fill: var(--nr-dashboard-groupBackgroundColor);"
"visible" segments use style="fill: var(--nr-dashboard-pageTitlebarBackgroundColor);"
So you can override it like this:
.nr-dashboard-ui_digital_display.visible svg path {
--nr-dashboard-pageTitlebarBackgroundColor : red;
}
Edit - I don't think you need .visible since it's the entire widget which is visible not individual segments.