How do you determine the temperature of a star by color?
I think you are talking about color index and temperature. So, I will briefly explain under that circumstance.
Color index, e.g., B-V is the difference in brightness (magnitude) of the light observed by filters B and V. (The following discussion can be generalized to other color indeces, e.g., U-B or g-i). Filters B and V have effective wavelengths 4450 (bluer) and V 5510 (redder) A (see Wikipedia), respectively, therefore B-V increases when the object becomes red. (Recall that magnitude is more negative for being brighter). The temperature which is derived from the color index is called "color temperature;" this is different to blackbody temperature, or kinetic temperature, or other types of inferred temperatures (see [this 2).
For the color temperature, this is very observational inference. To map from the color index to the color temperature, it is inferred from other well-known object. See Wikipedia for this.
Another way to work around is to transform the color index into the flux ratio, then applying the blackbody function as the inference. For example, from B-V >>> flux(4450A)/flux(5510A) >>> blackbody temperature corresponding to the flux ratio.