import numpy as np
import seaborn as sns
from matplotlib.colors import ListedColormap
data = np.random.randint(-1, 2, (10, 10))
sns.heatmap(data, cmap=ListedColormap(['green', 'yellow', 'red']), annot=True)
Map value to specific colour in seaborn heatmap