Skip to content
Snippets Groups Projects
Commit 5217eccf authored by jkerdreu's avatar jkerdreu
Browse files

Added decoding


git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/branches/0.7@2948 b32b6428-25c9-4566-ad07-03861ab6144f
parent cb1f7a33
No related branches found
No related tags found
No related merge requests found
def rgb_test(red,green,blue,brightness=0xFF):
rgb = brightness<<24|( red << 16)|( green << 8)|blue
print("rgb: %s" % rgb)
brightness = (rgb >> 24) & 0xFF
r = ((rgb >> 16) & 0xFF)
g = ((rgb >> 8) & 0xFF)
b = (rgb & 0xFF)
print(f"rgb: {brightness} {r} {g} {b}")
rgb_test(19,199,30,100)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment