Store color in one int #1
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: m.giller/mash-server#1
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This code stores a color in its three parts; red, green, and blue.
54eb509d4f/src/models/light.py (L4-L11)
I propose to store the color in a single
int
, and add getters for the red, green and blue parts.This code extracts the red, green and blue parts from a color stored in a single int.
Readability and clarity have priority for now. This potential performance improvement will therefor be closed for now.