rgb_cube


\documentclass[border=9,tikz]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.14}
\begin{document}
    \begin{tikzpicture}[axis/.style={->,black,thick}]
        \begin{axis}[axis equal, hide axis]
            \addplot3[<->, line width=0.6pt]
            	coordinates {
            		(1.45, 1,0)
            		(0,1,0)
            		(0,1,1.45)
            	};
        
	        \addplot3[<->, line width=0.6pt]
	        	coordinates {
	        		(0, 1,1.45)
	        		(0,1,0)
	        		(0,-0.45,0)
	        	};
        
        
        	\addplot3[surf,shader=interp,patch,patch type=rectangle,mesh/color input=explicit]
        		coordinates{
	        		(0,0,1)[color=cyan](1,0,1)[color=white]
	        		(1,0,0)[color=magenta](0,0,0)[color=blue]
	        		
	        		(1,0,1)[color=white](1,1,1)[color=yellow]
	        		(1,1,0)[color=red](1,0,0)[color=magenta]
	        		
	        		(0,1,1)[color=green](1,1,1)[color=yellow]
	        		(1,0,1)[color=white](0,0,1)[color=cyan]
        		};
        
	        \addplot3[line width=0.3pt]
	        	coordinates {
	        		(1,0,1) (1,0,0) (0,0,0) (0,0,1)
	        		(0,1,1) (1,1,1) (1,1,0) (1,0,0)
	        		(1,0,1) (0,0,1) (0,1,1) (1,1,1) (1,0,1)
	        	};
	    
	    	\node at (0,1,1.45) [anchor=north east] {G};
	    	\node at (1.45,1,0) [anchor=north east] {R};
	    	\node at (0, -0.45, 0) [anchor=east] {B};
        \end{axis}
    \end{tikzpicture}
\end{document}