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

Method rgb

pager/pagerctl.py:347–349  ·  view source on GitHub ↗

Convert RGB (0-255) to RGB565.

(r, g, b)

Source from the content-addressed store, hash-verified

345 # Color helpers
346 @staticmethod
347 def rgb(r, g, b):
348 """Convert RGB (0-255) to RGB565."""
349 return ((r >> 3) << 11) | ((g >> 2) << 5) | (b >> 3)
350
351 @staticmethod
352 def hex_color(rgb_hex):

Callers 5

__init__Method · 0.45
hex_colorMethod · 0.45
pagerctl.pyFile · 0.45
pager_menu.pyFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected