OLE to RGB (hex) style color codes

The best one

I settled in to adding on to a project that sought to convert a decomissioned Flash "application" over to HTML5. I decompile the swf files and dig in. I bust the door open like the Kool-Aid man and there are thirsty kids in that flv file. So anyway, I check the ActionScript code out and it is an unmanagable nightmare. I don't know whether it was the decompiling or just that the code was originally bad, but I couldn't make heads or tails of it.
So I honestly have no idea how he coded the color choosing algorithm. But it seemed to be using a code where White was equal to 16777215. After some Googling, I learned that this color format hasn't been used since like... VB 5. Lots of old VB forum posts talking about this OLE coloring scheme. Only two or three posts I found could even explain how it's generated. But it's generated through taking the red value between 0 and 255, adding it to green value between 0 and 255 multiplied by 256, then the blue value between 0 and 255 multiplied by 256 twice.

OLE = red + (green * 256) + (blue * 256 * 256)

RGB = "red % 255" + "(green / 256) % 256" + "(blue / 256 / 256) % 256"

Enough talk. Below, you can put in the RGB values you have in the first field and it'll convert you over to the OLE value. I'll code in the reverse function later (I'm really lazy).
RGB (hexadecimal)
OLE
Designed and coded by Tim Strickler.