Philippe Rivière

Results 1049 comments of Philippe Rivière

related: #6 #7 #114 #253 #397 #662

Two ideas: 1) This effect could also be achieved with css filters (https://github.com/observablehq/plot/pull/409) ~~~js fill: "imdb_rating", colorFilter: "grayscale(1) brightness(72%) contrast(999) invert(95%)" ~~~ these numbers are hard to get right, though:...

2. If we wanted to hardcode it (with proper color-analysis), we could have something like ~~~js fill: "imdb_rating", fillContrast: ["white", "black", "lime"] ~~~ and replace the (computed, scaled) fill by...

Here's a way to do it with #801 ~~~js Plot.text(…, { initialize: (facets, {fill}, {color}) => { if (fill && fill.scale === "color" && color) { return {facets, channels: {fill:...

There is now a unit test for this, which uses a [remap](https://github.com/observablehq/plot/blob/main/test/transforms/remap.js) function to build the [darker](https://github.com/observablehq/plot/blob/main/test/plots/darker-dodge.js#L5) transform. Not sure how to best package it for easier consumption.

See also https://observablehq.com/@argyleink/contrast-color

I think we need this not only for performance, but to allow users to click on the chart—currently if you click on a mark while it's updating, the event does...

there's even a pull-request https://github.com/observablehq/plot/pull/621

Half-related: [Density Contours Mark](https://observablehq.com/d/47909813e3d3d348) (#63).

A plot plugin that implements a convex hull: https://observablehq.com/@fil/convex-hull-mark The hull is computed in screen space, not data space, which is probably what we want in any case.