>>10599027By piece. Similar pieces are annoying to find in a pile of the same color. Sorting by color also makes your compartment sizes kind of arbitrary, while by-piece gives you a better sense of how much space each piece type needs. Toolboxes with removable cubbies are the best because you can grab a whole category at once, or you can grab just the piece you need.