Skip to content

Even if the RGB value is 100%, it will not be 255(ColorParser) #134

Closed
@SDH0531

Description

@SDH0531

[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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions