Getting the "current seriescolor" in a recipe

I am working on a Plots recipe based on the marginalhist example.
I would like to make the fillcolor of the histogram subplots dependend on the colorgradient used.
While this works manually

seriescolor --> cgrad(:starrynight)
fillcolor --> get(palette(:starrynight), 0.1)

I am not sure how to do something like:

seriescolor --> cgrad(:starrynight)
fillcolor --> get(palette(seriescolor), 0.1)

Using the gr backend I am on

  • julia release-1.5
  • Plots v1.5.3,
  • RecipesBase v1.0.1
  • StatsPlots v0.14.6

I’m not completely sure that I fully get what you are after, but does the following give, what you need?

seriescolor --> cgrad(:starrynight)
fillcolor --> get(palette(plotattributes[:seriescolor]), 0.1)

:ok_hand: Thanks. This chain is exactly what I was looking for.