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

Method rgb

pager/test_pager_code.py:120–122  ·  view source on GitHub ↗

Convert RGB888 to RGB565.

(r, g, b)

Source from the content-addressed store, hash-verified

118 # ========== COLOR HELPERS ==========
119 @staticmethod
120 def rgb(r, g, b):
121 """Convert RGB888 to RGB565."""
122 return ((r >> 3) << 11) | ((g >> 2) << 5) | (b >> 3)
123
124 @staticmethod
125 def hex_color(rgb_hex):

Callers 2

hex_colorMethod · 0.45
run_testsFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected