This is a screenshot from the Scots Syntax Atlas
I'm trying to create a similar feature on a leaflet map in Shiny, where there are colored icons next to each checkbox that match the points on the map. Sort of like a combination checkbox/legend.
Shiny Widgets has some checkbox styling options, but they all change the styling of the actual checkbox, whereas I'd like to insert icons/colors next to the checkbox. The closest thing I've found is something like what's mentioned here, where the user wanted to use an image as an option for a radio button/checkbox, but it would be absolutely wonderful if there were some way to integrate this with the color-coding of the points on the leaflet map (since I've already specified those colors in the leaflet palette) instead of having to e.g. create png swatches of each color and manually include them in the code.
Does anyone have resources/leads they can point me to on this? Any idea if it's possible?