You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the color is specified in % like "RGB(100%,100%,100%);", the RGB value will be 254 instead of 255.
I checked the source code, the calculation of the color value was as follows.
SDH0531
changed the title
Even if the RGB value is 100%, it will not be 255(CssPrser)
Even if the RGB value is 100%, it will not be 255(ColorPrser)
Feb 16, 2023
SDH0531
changed the title
Even if the RGB value is 100%, it will not be 255(ColorPrser)
Even if the RGB value is 100%, it will not be 255(ColorParser)
Feb 16, 2023
Hi Florian
That's right, this problem caused by performing division first.
Therefore, this problem can be solved by simply performing the multiplication first.
Thanks
[AngleSharp.CSS v0.17.0]
If the color is specified in % like "RGB(100%,100%,100%);", the RGB value will be 254 instead of 255.
I checked the source code, the calculation of the color value was as follows.
ColorParser.cs(217)
return (Byte)(255f / 100f * value);
With this, even if the value is 100, the result will be 254.
I don't think this is the correct behavior.
The text was updated successfully, but these errors were encountered: