Skip to content

[csslib] aliceblue parses to #0f08ff, and Color.peru / Color.antiqueWhite constants are wrong #2677

Closed

Description

@hkarmoush

Three named-color values are wrong:

  • lib/src/token_kind.dart: {'name': 'aliceblue', 'value': 0xF08FF} should be 0xF0F8FF. Parsing color: aliceblue prints #0f08ff.
  • lib/src/property.dart: Color.aliceBlue is '0f08ff' (same typo), Color.antiqueWhite is '0faebd7' (seven digits) and Color.peru is 'cd85ef' (should be cd853f).

I compared every named color in property.dart against token_kind.dart and these are the only mismatches (apart from transparent, which only exists in property.dart). Parsing peru and antiquewhite from CSS gives the right values, since token_kind.dart is correct for those.

final sheet = css.parse('a{color:aliceblue}');
// printed as: color: #0f08ff   (expected #f0f8ff)

Activity

  1. added
    type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)
    on Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    package:csslibtype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions