display of hex colors not consistent with company style

My company style guide has us use specific colors in a specific order. When I specify the hex codes for those colors in R, the ggplot colors are not the same as on the same machine, same monitor, but a different program (Excel, PPT). I cannot find help online for how to tune the color palette for Rstudio. It's version 1.2.5019 if that helps.

I am trying to attach an example of two programs displaying the colors side by side. The Excel snip shows the colors next to their hex representation, and the R snip shows the same hex colors listed below the geom_rect map.The R colors are washed out. The line of code is:

scale_fill_manual(values = wcri_colors, name = "Use of RN/PA") +

thanks for your help!
Karen

Could you share the code and data that produces the ggplot?

It's possible you have an alpha set for transparency which might explain the washed-out look.

To share a reproducible example, please refer to this post:

1 Like

ALPHA!!! That did it, thank you Martin, and consider this complete.

Ok, great.

I remembered you can check colours through this function from the scales package:

scales::show_col(c("#114855", "#EEAF28", "#4D8B54", "#D5E7D7", 
                   "#CC3300", "#6E673E", "#EEE9D8", "#7F7F7F"))
1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.