It's trivial to port this mess to Rust.
The palette was just generated by using a different trig function for R, G and B.<code> for ( count = 0 ; count < num_colors ; count ++ ) {<br><br> bmi->bmiColors[count].rgbBlue = cos(RAD(count))*256;<br> bmi->bmiColors[count].rgbGreen = sin(RAD(count))*256;<br> bmi->bmiColors[count].rgbRed = sinh(RAD(count))*256;<br> bmi->bmiColors[count].rgbReserved = 0;<br> }<br></code>