]> granicus.if.org Git - python/commitdiff
Fixed the brightness calculation
authorBarry Warsaw <barry@python.org>
Mon, 28 Sep 1998 22:52:02 +0000 (22:52 +0000)
committerBarry Warsaw <barry@python.org>
Mon, 28 Sep 1998 22:52:02 +0000 (22:52 +0000)
Tools/pynche/StripViewer.py

index 3997393df0a3a23314955a526fb0570cbc007e7e..5c38c0e9113a593ce476708a75e49319bb75aaa9 100644 (file)
@@ -231,7 +231,7 @@ class StripWidget:
            self.__leftarrow.move_to(-100)
        # and set the chip's outline
         brightness = ColorDB.triplet_to_brightness(rgbtuple)
-       if brightness <= 0.5:
+       if brightness <= 128:
            outline = 'white'
        else:
            outline = 'black'