MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / hex_color

Method hex_color

tests/test_pager_code.py:125–130  ·  view source on GitHub ↗

Convert 0xRRGGBB to RGB565.

(rgb_hex)

Source from the content-addressed store, hash-verified

123
124 @staticmethod
125 def hex_color(rgb_hex):
126 """Convert 0xRRGGBB to RGB565."""
127 r = (rgb_hex >> 16) & 0xFF
128 g = (rgb_hex >> 8) & 0xFF
129 b = rgb_hex & 0xFF
130 return MockPager.rgb(r, g, b)
131
132 # ========== INIT/CLEANUP ==========
133 def init(self):

Callers

nothing calls this directly

Calls 1

rgbMethod · 0.45

Tested by

no test coverage detected