← 输入框|github.com|刷新
Skip to content

color-utils parseColorWithAlpha can't parse rgb percentage values sent in from sass when using color.scale() or rgb() with percentages #11525

Open

Description

@JWiseCoder

parseColorWithAlpha in color utils gives wrong color values when percentages are passed from sass.

If we use color.scale() in our scss, recent sass updates serializes the rgb color using percentage values. parseColorWithAlpha does not parse those percentage values correctly, leading to wrong colors being displayed.

The same thing happens when using rbg() with percentage values. rgb(100%, 50%, 0) should be bright orange similar to rgb(255, 128, 0) but it parses to the same asrgb(100, 50, 0). (NOTE: This happens regardless of sass version)

Activity

  1. changed the title [-]color-utils `parseColorWithAlpha` can't parse rgb percentage values sent in from sass when using `color.scale()`[/-] [+]color-utils `parseColorWithAlpha` can't parse rgb percentage values sent in from sass when using `color.scale()` or `rgb()`[/+] on Oct 14, 2026
  2. changed the title [-]color-utils `parseColorWithAlpha` can't parse rgb percentage values sent in from sass when using `color.scale()` or `rgb()`[/-] [+]color-utils `parseColorWithAlpha` can't parse rgb percentage values sent in from sass when using `color.scale()` or `rgb()` with percentages[/+] on Oct 16, 2026
  3. added and removed
    bug-pending-triageReported bug, pending triage to confirm.
    on Oct 23, 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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions