I am currently generating clustermaps in seaborn and labeling the row colors as below.
matrix = pd.DataFrame(np.random.random_integers(0,1, size=(50,4)))
labels
There is another option for feeding in the annotation colors: you can provide a whole dataframe in the row colors or col_colors options, instead of a list of lists.
This strategy might be particularly helpful if you have a dataframe with several annotations you want represented. Instead of map, you can use the pandas function replace.
Something such as this bit can be used to modify the other answer:
## This step is necessary because you can't use replace with the tuple rgb values
lut = {k:matplotlib.colors.to_hex(v) for k, v in lut.iteritems()}
annotations_df = annotations_df.replace(lut)
g=sns.clustermap(matrix, col_cluster=False, linewidths=0.1, cmap='coolwarm', row_colors=annotations_df)
plt.show()