Commits

oliver_g committed 984b7ec

nds parser: add createDescription for palette colors

  • Participants
  • Parent commits ee97593
  • Branches nds-parser

Comments (0)

Files changed (1)

File hachoir-parser/hachoir_parser/program/nds.py

         yield Bits(self, "blue", 5)
         yield NullBits(self, "pad", 1)
 
+    def createDescription(self):
+        return "#%02x%02x%02x" % (self["red"].value << 3, self["green"].value << 3, self["blue"].value << 3)
 
 class Banner(FieldSet):
     def createFields(self):