소스 검색

comment for intensed black and non-intensed white

MURAOKA Taro 11 년 전
부모
커밋
3df0441594
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  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