HI @Chyavan_MC ,

I am not fully familiar with this process. All I know is that you can use matplotlib for this. Now, with some ChatGPT help, I can also provide this snippet. I have not tested it but it may provide a starting point in your quest:

import numpy as np

import matplotlib.pyplot as plt

from mpl_toolkits.mplot3d import Axes3D

#
Your 3-dimensional array of RGB values

rgb_array = np.array([

[

[‘#FF0000’, ‘#00FF00’, ‘#0000FF’],

[‘#FFFF00’, ‘#FF00FF’, ‘#00FFFF’],

[‘#FFFFFF’, ‘#000000’, ‘#888888’],

],

[

[‘#AA0000’, ‘#00AA00’, ‘#0000AA’],

[‘#AAAA00’, ‘#AA00AA’, ‘#00AAAA’],

[‘#AAAAAA’, ‘#000000’, ‘#555555’],

],

])

#
Convert hex colors to RGB tuples

def hex_to_rgb(hex_color):

return tuple(int(hex_color.lstrip(‘#’)[i:i+2], 16) for i in (0, 2, 4))

rgb_array = np.vectorize(hex_to_rgb)(rgb_array)

#
Set up the figure and axis for 3D plotting

fig = plt.figure()

ax = fig.add_subplot(111, projection=‘3d’)

#
Plot the RGB values in 3D space

for i in range(rgb_array.shape[0]):

for j in range(rgb_array.shape[1]):

for k in range(rgb_array.shape[2]):

r, g, b = rgb_array[i, j, k]

ax.scatter(i, j, k, c=[(r/255, g/255, b/255)], marker=‘o’, depthshade=True)

#
Set the axis labels

ax.set_xlabel(‘X-axis’)

ax.set_ylabel(‘Y-axis’)

ax.set_zlabel(‘Z-axis’)

#
Show the plot

plt.show()