Skip to content

Support all CSS color formats #12

@sharkdp

Description

@sharkdp

See https://developer.mozilla.org/en-US/docs/Web/CSS/color_value for all details and test cases

  • hexadecimal RRGGBB (#ff0000)
  • hexadecimal RGB (#f00)
  • rgb(0, 0, 255)
  • rgb(0%, 50%, 100%)
  • hsl(120, 100%, 75%)
  • hsl(…,…,…) in all variations
    • With and without ° sign
    • Negative angles
  • predefined color names
  • CSS Level 4 predefined names (rebeccapurple)

optional:

  • CSS Color Level 4: space-separated rgb(R G B[ A]) - only a draft
  • gray(0.3)
  • gray(30%)
  • rad instead of degrees
  • turns instead of degrees

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions