import colour
import matplotlib.pyplot as plt
from colour.plotting import plot_chromaticity_diagram_CIE1931

RGB_points = [
    [0, 0, 0],
    [0, 0, 1],
    [1, 0, 0],
    [1, 0, 1],
    [0, 1, 0],
    [0, 1, 1],
    [1, 1, 0],
    [1, 1, 1],    
    [255/255, 115/255, 0/255],
    [240/255, 115/255, 35/255],
    [210/255, 135/255, 80/255],
    [185/255, 140/255, 125/255],
    [135/255, 135/255, 135/255]
]
labels = ['Черный', 'Синий', 'Красный', "Фиолетовый", "Зелёный", "Голубой", "Жёлтый", "Белый", "1", "2", "3", "4", "5"]

figure, axes = plot_chromaticity_diagram_CIE1931(standalone=False)
for rgb, label in zip(RGB_points, labels):
    XYZ = colour.RGB_to_XYZ(rgb, 'sRGB')
    xy = colour.XYZ_to_xy(XYZ)
    plt.plot(xy[0], xy[1], 'o', color='white', markeredgecolor='black', markersize=8)
    plt.annotate(label, (xy[0], xy[1]), textcoords="offset points", 
                 xytext=(5,5), ha='left', color='black', weight='bold')
plt.show()
