mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	label: adjust forecolor boundary
This commit is contained in:
		@@ -52,7 +52,7 @@ func (l *Label) ForegroundColor() template.CSS {
 | 
			
		||||
			b := float32(0xFF & color)
 | 
			
		||||
			luminance := (0.2126*r + 0.7152*g + 0.0722*b) / 255
 | 
			
		||||
 | 
			
		||||
			if luminance < 0.5 {
 | 
			
		||||
			if luminance < 0.66 {
 | 
			
		||||
				return template.CSS("#fff")
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user