I know this question seems to duplicate to How to convert RGB to HTML color?.
However I think the answer tries to teach more than the original question. In fact, I don't understand the answer and can't use it in the actual code.
Please give me the simplest mathematical formula to translate RGB to the form like #fff which I think represents white.
I know the required color is written as R:63,G:81,B:181 in RGB.
R:63, G:81, B:181
if the rgb in decimal is the only information you have, you don't need to transfer, simply put
color: rgb(61, 81, 181)