WidgetKit watchOS 10 .accessoryCorner cannot figure out how to color a Gauge?

187 Views Asked by At

Not sure if its a watchOS 10 bug but I cannot figure out a way to get this Gauge to have any color, it always renders white in preview and on device?

  case .accessoryCorner:
      Text("\(75)%")
        .font(.system(size: 18))
          .fontWeight(.bold)
          .widgetLabel {
              Gauge(value: Double(recoveryScore), in: 0...100) {
                  Text("Not shown")
              } currentValueLabel: {
                  Text("Not shown")
              } minimumValueLabel: {
                  Text("0") // Watch out for clipping
              } maximumValueLabel: {
                  Text("100") // Watch out for clipping
              }
              
              .foregroundColor(.green) //.foregroundStyle doesn't work either

          }
1

There are 1 best solutions below

0
On BEST ANSWER

‍♂️ I should have known, simply use .tint(.green)