Skip to content

Hex value 1 is parsed as 255 #2

@jfsiii

Description

@jfsiii

The constructor allows float values for percentages (e.g, 0.8 == 204 == CC) and integers (204 == CC).

As a result, the value 1 is being interpreted as 100% or 255. This is almost certainly not what the developer wanted.

Ideas:

  • require 1.0, not 1, for 100%
  • ignore 1 as a percentage value altogether

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions