5 lines
243 B
Python
5 lines
243 B
Python
class Utils:
|
|
# method from Tony Goodhew 21st April 2022, for thepihut.com
|
|
@staticmethod
|
|
def colour(R,G,B): # Convert RGB888 to RGB565
|
|
return (((G&0b00011100)<<3) +((B&0b11111000)>>3)<<8) + (R&0b11111000)+((G&0b11100000)>>5) |