MCPcopy Create free account
hub / github.com/cifertech/DisplayKit / hex_to_rgb

Function hex_to_rgb

server/icon_export.py:35–39  ·  view source on GitHub ↗
(hex_str: str)

Source from the content-addressed store, hash-verified

33
34
35def hex_to_rgb(hex_str: str) -> tuple[int, int, int]:
36 s = (hex_str or "#000000").strip().lstrip("#")
37 if len(s) == 6:
38 return int(s[0:2], 16), int(s[2:4], 16), int(s[4:6], 16)
39 return 0, 0, 0
40
41
42def rgba_to_rgb565_row(

Callers 1

export_iconsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected