Here's a small reproducible example from the iris dataset. We plot mean ± standard deviation of petal lengths of the different species, like so:
i2 <- iris %>%
select(Species, Petal.Length) %>%
pivot_longer(-Species, names_to='petal', values_to='measure') %>%
group_by(Species) %>%
summarise_at(vars(measure),
list(
mean= ~ mean(.),
sd= ~ sd(.)
))
ggplot(i2, aes(x=Species, y=mean)) +
geom_pointrange(aes(ymin=mean-sd, ymax=mean+sd, colour=Species), shape=21, size=1, fill='black')
Now, I would like to set the range line and point stroke in two different colours. The above is the closest I could get to that. Point shape 21 allows me to have a fill and stroke colour, but the colour parameter in aes() also sets the range line colour! So it does not quite get me there...
I have in mind something like:

