github.com/argoproj/argo-cd/v3@v3.2.1/server/badge/color.go (about) 1 package badge 2 3 import ( 4 "fmt" 5 "image/color" 6 7 appv1 "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1" 8 9 "github.com/argoproj/gitops-engine/pkg/health" 10 ) 11 12 var ( 13 Blue = color.RGBA{16, 61, 102, 255} // #103d66 14 Green = color.RGBA{11, 97, 42, 255} // #0b612a 15 Purple = color.RGBA{115, 31, 77, 255} // #731f4d 16 Orange = color.RGBA{189, 115, 0, 255} // #bd7300 17 Red = color.RGBA{167, 46, 38, 255} // #a72e26 18 Grey = color.RGBA{41, 52, 61, 255} // #29343D 19 20 HealthStatusColors = map[health.HealthStatusCode]color.RGBA{ 21 health.HealthStatusDegraded: Red, 22 health.HealthStatusHealthy: Green, 23 health.HealthStatusMissing: Purple, 24 health.HealthStatusProgressing: Blue, 25 health.HealthStatusSuspended: Grey, 26 health.HealthStatusUnknown: Purple, 27 } 28 29 SyncStatusColors = map[appv1.SyncStatusCode]color.RGBA{ 30 appv1.SyncStatusCodeSynced: Green, 31 appv1.SyncStatusCodeOutOfSync: Orange, 32 appv1.SyncStatusCodeUnknown: Purple, 33 } 34 ) 35 36 func toRGBString(col color.RGBA) string { 37 return fmt.Sprintf("rgb(%d, %d, %d)", col.R, col.G, col.B) 38 }