Skip to content

Allow light-dark() function in color values #2409

@tmcw

Description

@tmcw

I would like to create a mark like this:

Plot.areaY(stats, {
  y: "y",
  x: "x",
  fill: "light-dark(blue, lightblue)",
})

However, this does not work because isColor checks for a bunch of color formats as well as the color-mix function, but not for light-dark(), which makes it possible to automatically support color schemes.

I think that adding light-dark to that method would be all that's necessary.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions