library(plotly)
R gist — Plot an interactive 3D RGB colour space
Gist
<- seq(0, 255, 25.5)
codes
<- expand.grid(
rgb r = codes,
g = codes,
b = codes
%>%
) mutate(colour = rgb(r, g, b, maxColorValue = 255))
%>%
rgb plot_ly(x = ~r, y = ~g, z = ~b, marker = list(color = ~colour, size = 6))