What you need is convert Temperature to RGB color. For that you can use:
You image however suggest you are using wavelength colors instead of temperature colors:
as your gradient has nothing to do with real temperature then just use the code in the link. Then just linearly interpolate between temperature and wavelength like:
wavelength = 400 + (800-400)*(T-t0)/(t1-t0) [nm]
where T is your temperature and t0,t1
are the gradient edge temperatures in the same units as T
for example:
t0=-50C
t1=+50C
if you play with t0,t1
you might shift the colors to left and right. You can also use any other interpolation not just linear. Or even interpolate the image RGB like I did in both of the linked QAs.
In case you wanted the real thing (which you clearly stated you don't but those who venture here due to your title might) then the real problem is how to convert temperature into BV index. I cannot find any equation for it now. The only stuff I found is
equation:

table:
T[K] BV
O5 42 000 -0.33
O9 34 000 -0.31
B0 30 000 -0.30
B2 20 900 -0.24
B5 15 200 -0.17
B8 11 400 -0.11
A0 9 790 -0.02
A2 9 000 0.05
A5 8 180 0.15
F0 7 300 0.30
F2 7 000 0.35
F5 6 650 0.44
F8 6 250 0.52
G0 5 940 0.58
G2 5 790 0.63
G5 5 560 0.68
G8 5 310 0.74
K0 5 150 0.81
K2 4 830 0.91
K5 4 410 1.15
M0 3 840 1.40
M2 3 170 1.49
M5 3 170 1.64
dependece graph::

So you either interpolate it or approximate from table/graph or compute it algebraically from the equation (looks like quadratic equation to me).
if I did not make any mistake than:
bv0=(+sqrt((729.0*T*T) + 52900000000.0) - (58*T) + 230000.0 ) / 46.0*T
bv1=(-sqrt((729.0*T*T) + 52900000000.0) - (58*T) + 230000.0 ) / 46.0*T
my guts are telling me that bv0
is the one as bv1
would be too much negative. but It looks like the Wiki equation is just very poor approximation so its inverse is even worse ...
On top of all this if you got specific parameters of the object and environment than you need to change the color by it by adding scattering and mixing body color if you want more realistic colors.