Procházet zdrojové kódy

comment for intensed black and non-intensed white

MURAOKA Taro před 11 roky
rodič
revize
3df0441594
1 změnil soubory, kde provedl 2 přidání a 0 odebrání
  1. 2 0
      colorable_windows.go

+ 2 - 0
colorable_windows.go

@@ -519,6 +519,7 @@ func toConsoleColor(rgb int) (c consoleColor) {
 		if b >= a {
 			c.blue = true
 		}
+		// non-intensed white is lighter than intensed black, so swap those.
 		if c.red && c.green && c.blue {
 			c.red, c.green, c.blue = false, false, false
 			c.intensity = true
@@ -538,6 +539,7 @@ func toConsoleColor(rgb int) (c consoleColor) {
 			c.blue = true
 		}
 		c.intensity = true
+		// intensed black is darker than non-intensed white, so swap those.
 		if !c.red && !c.green && !c.blue {
 			c.red, c.green, c.blue = true, true, true
 			c.intensity = false