github.com/argoproj/argo-cd@v1.8.7/server/badge/color.go (about) 1 package badge 2 3 import ( 4 "fmt" 5 "image/color" 6 7 appv1 "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1" 8 9 "github.com/argoproj/gitops-engine/pkg/health" 10 ) 11 12 var ( 13 Blue = color.RGBA{13, 173, 234, 255} // #0dadea 14 Green = color.RGBA{24, 190, 82, 255} // #18be52 15 Purple = color.RGBA{178, 102, 255, 255} // #b266ff 16 Orange = color.RGBA{244, 192, 48, 255} // #f4c030 17 Red = color.RGBA{233, 109, 118, 255} // #e96d76 18 Grey = color.RGBA{204, 214, 221, 255} // #ccd6dd 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 }