Blender 2.8 (python) - input RGB doesn't match hex color nor actual color
TL;DR Enter hex values in the hex tab of the color picker.



Hex values in itself don't specify how they are supposed to be displayed. It depends on the color space that is used to interpret the value and the display transform to show it on your monitor. For the internet, where these hex codes are commonly used, it's standard to use the sRGB color space. It uses the Rec. 709 primaries. The conversion of values from CIE XYZ to RGB values includes gamma correction.

If you want to use your gamma corrected sRGB values represented as hex, then you have to use the hex tab to directly enter them. The RGB selection in the color wheel is using scene linear data / scene referred values that are not gamma corrected, which is why you're getting a different color than you're expecting.


  In Blender, the Hex and HSV/HSL values are automatically gamma corrected however, for the RGB values, they are in Scene Linear color space, and are therefore not gamma corrected. For more information, see the Color Management and Exposure page.