Skip to content

opacity legend 2#2416

Merged
mbostock merged 7 commits intomainfrom
fil/opacity-legend
Apr 11, 2026
Merged

opacity legend 2#2416
mbostock merged 7 commits intomainfrom
fil/opacity-legend

Conversation

@Fil
Copy link
Copy Markdown
Contributor

@Fil Fil commented Apr 10, 2026

Upgrade the color legend, to

  • support for display-p3 colors
  • have a checkerboard
  • support dark mode

a test showing the 3 2 new features:

a test complete with display-p3 color, checkerboard, and dark mode

@Fil Fil requested a review from mbostock April 10, 2026 12:07
@Fil Fil marked this pull request as draft April 10, 2026 12:10
@Fil

This comment was marked as resolved.

@Fil Fil force-pushed the fil/opacity-legend branch from bfa7112 to 84565c8 Compare April 10, 2026 12:18
@Fil Fil marked this pull request as ready for review April 10, 2026 12:19
Base automatically changed from mbostock/raster-color-space to main April 10, 2026 18:03
@Fil Fil force-pushed the fil/opacity-legend branch from 23ddfa4 to acddca6 Compare April 11, 2026 07:09
Copy link
Copy Markdown
Member

@mbostock mbostock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find the checkerboard ugly, but more importantly, it doesn’t match what you see in the chart itself (since charts don’t have a checkerboard background). The use of a checkerboard pattern therefore feels like a technical cue; the reader must apply their knowledge of the checkerboard convention from other applications to say “a ha, this is an opacity encoding.” Often I don’t think the user cares about the distinction between opacity and color, since in practice due to compositing an opacity encoding is a color encoding.

Of course I like that the opacity legend supports CSS4 and dark mode, so we should do that, but I’m going to remove the rest.

@mbostock mbostock enabled auto-merge (squash) April 11, 2026 17:15
@mbostock mbostock merged commit 7df1c3d into main Apr 11, 2026
1 check passed
@mbostock mbostock deleted the fil/opacity-legend branch April 11, 2026 17:19
This was referenced Apr 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants