Using "Droplet", how to modify the style of the dropcap

Further to my thread at:

I have been trying to add colour to the dropcaps, and eventually have come up with this code:

#set page(width: 12cm, height: auto)
#set par(first-line-indent: 1em, spacing: 0.5em, justify: false)
#import "@preview/droplet:0.3.1": dropcap

// Keep original dropcap
#let orig-dropcap = dropcap

// Dropcap with my defaults
#let dropcap = orig-dropcap.with(
  height: 2,
  gap: 1pt,
  hanging-indent: 0pt,
  color: (rgb("#c00000")),
  stroke: 0.5pt +  rgb("#c00000"))
  )

==== Heading

#dropcap[W][hy #lorem(8)]

==== Heading

#dropcap[A#h(1pt)][bit #lorem(8)]

==== Heading

#dropcap[I#h(2pt)][can #lorem(8)]

which compiles as I would like. However, Typst gives a warning: Unexpected argument: color

How can I set the colour of the dropcaps without throwing up the warning?

Many thanks

:slight_smile:
Mark

That’s an error. Warning will still allow compiling the document.

If you read the documentation, there is no color argument. And text doesn’t have one, either. There is fill, if that is what you’re implying.

Thanks so much. Yes, that was it. It just shows how we non-coders, used to word processors or page-makeup software think in terms of text having a colour rather than a shape with a fill of some colour.

All good.

:slight_smile:
Mark