title: PIL: using fromarray() with binary data and writing coloured text
body: <p>I've a basic problem with Python's library PIL. I have some .txt files containing only <strong>0</strong> and <strong>1</strong> values arranged in matrices. I have transformed the "binary" data in an image with the function <strong>Image.fromarray()</strong> included in PIL. The format of my data produces black&amp;white images if I multiply it by 255, and that's fine for me. Now I want to add some text to the image, using the appropriate <strong>text</strong> function included in PIL, but I want that text to be <strong>coloured</strong>. Clearly, I can't do it because the image obtained from <strong>fromarray</strong> has a grayscale colormap. How can I change it?</p>