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

Function tint

roach/obs_manager/birdview/chauffeurnet.py:27–35  ·  view source on GitHub ↗
(color, factor)

Source from the content-addressed store, hash-verified

25
26
27def tint(color, factor):
28 r, g, b = color
29 r = int(r + (255-r) * factor)
30 g = int(g + (255-g) * factor)
31 b = int(b + (255-b) * factor)
32 r = min(r, 255)
33 g = min(g, 255)
34 b = min(b, 255)
35 return (r, g, b)
36
37
38class ObsManager():

Callers 1

get_observationMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected