Skip to content

Commit a6f0930

Browse files
committed
Use bitwise 'or' to combine r, g, and b.
For consistency, switch from '+' to '|' since bitwise operations are already being used. #13 (comment)
1 parent 17e411a commit a6f0930

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_tcs34725.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ def color(self):
250250
Blue = 255 (0x0000ff), SlateGray = 7372944 (0x708090)
251251
"""
252252
r, g, b = self.color_rgb_bytes
253-
return (r << 16) + (g << 8) + b
253+
return (r << 16) | (g << 8) | b
254254

255255

256256
@property

0 commit comments

Comments
 (0)