I am attempting to provide shiny with a set of values with unique coloring for selectInput. Unfortunately, though, I have yet to find any type of documentation to use for reference. Is this possible? I have attempted this a couple dozen ways using css and html but I am not very good with either language so I may be just coding it wrong. (My problem is probably the later of the two.)
CSS example
selectInput("annotateColor", "Annotations", c("black", "blue", "Matching"))),
tags$style(type='text/css', "#annotateColor select option:nth-child(1) { color:black; }"),
tags$style(type='text/css', "#annotateColor select option:nth-child(2){ color: white; }"),
tags$style(type='text/css', "#annotateColor select option:nth-child(3) { color:orange; }")
HTML example
selectInput("annotateColor", "Annotations", c(
HTML("<font color='black'>black</font>") ,
HTML("<font color='white'>blue</font>") ,
HTML("<font color='orange'>Matching</font>") ,
))
Ideally this would just be a small list of multi-colored text the user can pick a single option from. I am mainly doing this because the main users who will be utilizing my application do not speak English. Having a visual for them to recognize with the drop down would be extremely useful.
Thank you for your help and time,
Amber