MCPcopy Create free account
hub / github.com/OpenDriveLab/DriveAdapter / tint

Function tint

roach/obs_manager/birdview/hdmap_generate.py:24–32  ·  view source on GitHub ↗
(color, factor)

Source from the content-addressed store, hash-verified

22COLOR_ALUMINIUM_5 = (46, 52, 54)
23
24def tint(color, factor):
25 r, g, b = color
26 r = int(r + (255-r) * factor)
27 g = int(g + (255-g) * factor)
28 b = int(b + (255-b) * factor)
29 r = min(r, 255)
30 g = min(g, 255)
31 b = min(b, 255)
32 return (r, g, b)
33

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected