So setting HSV does change RGB?
Ok, time to do this brute force. Take a 1x1 pixel pure red image. Load it into RMXP at bitmap. Run all hues from 0 to 359 and save the RGB values to a file (or possibly a CSV file so you can open it in Excel to analyze the data later). Do the same in RMPY. Compare the results. Somewhere there should be a set of numbers that is similar or you should be able to figure out a pattern. You can also try first all values from 0 to 350, step 10 first so you get a quick overview before analyzing the whole thing. This should give you the data to figure out why your code does it differently.