Even if you're not close with your boss, chances are you have a working, first_name_basis relationship. Maintaining that in your official letter is okay. You don't need to keep a Victorian level of formality here__just make sure it's a professional tone.
Or meet up with said colleagues at an industry event, because the world is awkwardly small. So it's in your best interest to make sure that your resignation letter is clear, concise, and polite. Here are some best practices you can follow to make your big exit a professional one.