Using used cabinets is a risk.
Some may be in good condition, others in the same set can be a mess. Then fitment can be a challenge because the cabinets were not designed for the space they are being used in.
That said, if the cabinets are in good shape and you have patience you can build a nice layout.
Any cabinet can be painted. Find a good paint store that is willing to paint match the cabinets. You may be able to get touch up kits from the manufacturer, but a good paint pro can be your savior. Find someone that has the knowledge of what paint is needed for that cabinet finish and is willing to work to get a close to perfect match.
Get fill strips. These are pieces that fill in the spaces between the cabinets and the walls or between the cabinets when spacing is needed, ( like at corners) You may not be able to get the exact color fill strip, so again the paint match is important.
Before hanging, check if any boxes need reinforced. They can get damaged or weakened when being taken down. Do any repairs and reinforcements before installation.
Finally, don't expect the cabinets to be perfect. They are used so there will be some imperfections.