We've all seen the famous painting of Marilyn Monroe created by Andy Warhol.
Marilyn Monroe

Let's try to replicate that effect with the usual suspects.

Your task is to write a program/programs that do as many as possible of the following tasks:

  1. With one image as the input, generate four color palettes from that image and print a 4x4 grid with different "Warhol'd" color variants of that image.

  2. With two images as input, generate two color palettes from each image and print a Warhol'd grid of the first image.

  3. With four images as input, generate one color palette from each image and print a Warhol'd grid of the first image.

Of course, it would be cheating to hardcode palettes you like the best, so your program has to determine a set of colors that is both distinct and aesthetically pleasing. Warhol used five distinct colors in each panel, so five is your goal as well.

Here are some photos that you could use to showcase your program:

Great Wave Coral Reef Rainbow Starry Night River Brown Bear Waterfall Mandrill Crab Nebula American Gothic Mona Lisa Scream

Try to achieve a wide range of palette colorings and of course make them as aesthetically pleasing as possible.

This is a popularity contest, so the answer with the most net votes wins.

(Formatting largely copied from Paint by Numbers, which was a partial inspiration for this challenge as was American Gothic in the palette of Mona Lisa: Rearrange the pixels)

closed as off-topic by xnor, John Dvorak, isaacg, Ypnypn, Sp3000 Jan 30 '15 at 0:43

  • This question does not appear to be about programming puzzles or code golf within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Related from Mathematica.SE ... and seeing that I have really lost the motivation to do anything but copy the accepted answer, because I won't be able to do better anyway. – Martin Ender Jan 29 '15 at 21:34
  • (Oh right, it requires one intermediate manual step... although I suspect that step will be very similar to Paint by Numbers.) – Martin Ender Jan 29 '15 at 21:38
  • 9
    I'm voting to close this question as off-topic because it seems to be an art contest, with programming serving only a purely functional role of implementing artistic effects. – xnor Jan 29 '15 at 22:23
  • 3
    I like how one picture I generated and one I actually took have become our norms. – Calvin's Hobbies Jan 29 '15 at 23:38
  • 1
    Everyone completely misinterpreted this question. "With one image as the input, generate four color palettes from that image and print a 4x4 grid with different "Warhol'd" color variants of that image. " It's not just "pick a random color out of a list" such as the first answer, you are meant to programmatically generate a limited palette based on the colors of another image (similar to the two other challenges I linked to) The interesting element I feel is that picking five random colors from a picture won't yield good results, so how does one determine aesthetics programmatically. – TApicella Jan 30 '15 at 7:54

Mathematica

namedColors = {Red, Green, Blue, Black, White, Gray, Cyan, Magenta, Yellow, Brown, Orange, Pink, Purple};
    myRules = 
      Table[Rule[namedColors[[i]], RandomChoice[namedColors]], {j, 4}, {i,
         Length[namedColors]}];

myImages = {--images here--};

Grid@Table[ColorQuantize[ColorReplace[myImages[[i]], myRules[[j]]],5], 
{i, Length[myImages]}, {j, 4}]

enter image description here

Not the answer you're looking for? Browse other questions tagged or ask your own question.