How do i get the colors of blackbody radiation

As the title says, i need a formula or function to get the color of stars/fire depending on a temperature value