3
\$\begingroup\$

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)

\$\endgroup\$
8
  • \$\begingroup\$ 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. \$\endgroup\$ Jan 29, 2015 at 21:34
  • \$\begingroup\$ (Oh right, it requires one intermediate manual step... although I suspect that step will be very similar to Paint by Numbers.) \$\endgroup\$ Jan 29, 2015 at 21:38
  • 10
    \$\begingroup\$ 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. \$\endgroup\$
    – xnor
    Jan 29, 2015 at 22:23
  • 3
    \$\begingroup\$ I like how one picture I generated and one I actually took have become our norms. \$\endgroup\$ Jan 29, 2015 at 23:38
  • 1
    \$\begingroup\$ 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. \$\endgroup\$
    – TApicella
    Jan 30, 2015 at 7:54

1 Answer 1

5
\$\begingroup\$

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

\$\endgroup\$

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