About HEX to RGB
A hex colour is RGB written in base 16. #4a49d8 is three pairs of digits: 4a is red, 49 is green, d8 is blue, each a number from 00 to ff — that is 0 to 255 in the decimal you are used to. The conversion is a change of notation, not of colour.
Doing it by hand means converting each pair separately, which is where mistakes creep in, particularly with the shorthand forms. #abc is not #0a0b0c; each digit is doubled, so it means #aabbcc. An eight-digit value adds a fourth pair for alpha, where ff is opaque and 00 is invisible.
RGB notation is worth having when you need to adjust opacity in code, when you are interpolating between colours, or when an API expects numbers rather than a string.
How to convert HEX to RGB
Paste your hex code
With or without the hash, in three, four, six or eight digits. The swatch also opens your system colour picker.
Copy the RGB value
The highlighted row gives CSS-ready rgb() notation. An alpha below 1 appears after a slash.
Take the other formats if you need them
HSL, HSV, CMYK and OKLCH are calculated at the same time, so there is no second conversion to run.