Firstly, my initial observation is incorrect. If you click on the "Calculation" tab to check the background-clor, this difference is observed for both CSS rules inside the "style" tag and inline in the elements. I
In the chromium source code, this implementation explains the difference in the value of 0.001961 in the alpha value
// Convert the floating pointer number of alpha to an integer in the range [0, 256), // with an equal distribution across all 256 values. int alphaComponent = static_cast<int>( clampTo<double>(alpha, 0.0, 1.0) * nextafter(256.0, 0.0));
Here, if alpha is 0.3, then ฮฑComponent becomes 0.298039. (If I set alpha to any floating point in [0.0, 1.0], the number shown by webInspector corresponds to the alphaComponent value obtained from the formula above.
source share