Forráskód Böngészése

directtools: Fix incorrect rounding for color conversion to hex

The color picker returns color values up to 255.99 so this can otherwise result in it returning a color like #100100100, and the hex code otherwise not matching with what is displayed in the color picker.
rdb 5 éve
szülő
commit
7c676b5d26
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      direct/src/directtools/DirectUtil.py

+ 1 - 1
direct/src/directtools/DirectUtil.py

@@ -19,7 +19,7 @@ def getTkColorString(color):
     Print out a Tk compatible version of a color string
     """
     def toHex(intVal):
-        val = int(round(intVal))
+        val = int(intVal)
         if val < 16:
             return "0" + hex(val)[2:]
         else: