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

Method rgb

pager/pagerctl_mock.py:240–242  ·  view source on GitHub ↗

Convert RGB (0-255) to RGB565.

(r, g, b)

Source from the content-addressed store, hash-verified

238
239 @staticmethod
240 def rgb(r, g, b):
241 """Convert RGB (0-255) to RGB565."""
242 return ((r >> 3) << 11) | ((g >> 2) << 5) | (b >> 3)
243
244 @staticmethod
245 def hex_color(rgb_hex):

Callers 2

hex_colorMethod · 0.45
pagerctl_mock.pyFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected