If you want to specify the colours of the column annotations in your heatmap you can define a colour palette for the gene_functionannotations and then pass this information into pheatmap. A suggestion on how you could update your code:
Create a color palette for every unique function in gene_function
Make a list of annotation_colors and set it to annotation_colors in pheatmap.