Color (boolean selection, boolean inactive, boolean hovered) { if (selection) { return inactive ? SELECTED_INACTIVE_BACKGROUND : SELECTED_BACKGROUND; } return hovered ? HOVER_BACKGROUND : BACKGROUND; }