Code
library(ggplot2)
library(plotly)
<-colors()
color_name <- c(rep(1:25,26),1:7)
x <- c(rep(27,7),rep(26:1,each =25))
y<- data.frame(x,y,color_name)
Data
<- Data |>
Pggplot(aes(x =x, y=y,label =color_name))+
geom_point(pch =22, size =7, fill = color_name) +
theme(legend.position = "none") +theme_void()+
labs(title = "Color names in R (657 colors)", x ="",y ="")
|> ggplotly(tooltip = "label") |>
P config( displayModeBar = FALSE)