Thanks for this notebook. On this example, what would be the idiomatic way to make the text fill conditional based on the value, e.g, if I wanted values greater than 5 to have a text mark with white fill instead of black fill (for greater contrast). I naively tried using a function in the "fill" option, but that doesn't work because I'm guessing that the "fill" defaults to trying to use the color object (in the absence of a literal color name/code like "white").
You could do two text marks, one black with a filter on data being "in the middle", and one white with a filter on data being "extreme". In the (near) future there should be a transform/layout that allows to fill with a "contrasted" color, see https://github.com/observablehq/plot/issues/540#issuecomment-1067072029 (which depends on #801 landing).