Skip to content

[Bug] colorStops里color写法 rgb(254 134 22 / 20%)报错 #17274

@oseaweed

Description

@oseaweed

Version

5.3.0

Link to Minimal Reproduction

No response

Steps to Reproduce

color渐变色配置:

areaStyle: {
  opacity: 0.5,
  color: {
    type: 'linear',
    x: 0,
    y: 0,
    x2: 0,
    y2: 1,
    colorStops: [
      {
        offset: 0,
        color: 'rgb(254 134 22 / 20%)',
      },
      {
        offset: 1,
        color: '#fff',
      },
    ],
  },
},

Current Behavior

colorStops里color写法 rgb(254 134 22 / 20%)会报错,改成rgba(254 134 22 / 20%)就好了
image

Expected Behavior

支持 rgb(254 134 22 / 20%)写法

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

Metadata

Metadata

Assignees

Labels

enhancementstaleInactive for a long time. Will be closed in 7 days.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions