When I told my dad the four precepts of getting someone hooked, his ears perked up.
First, you need a trigger. Something that alerts your customer. Then you need the action. And the Action has the EASY (more important than the motivation).
It was on the same day, that I read the part about the importance of EASE in the action inEyal’s book Hooked that I got matching feedback from three users of the beta version of Huedoku Pix: “Choose the colors for me” is what I heard.
Our users are motivated to create a puzzle because they get the satisfaction and joy of hiding a photo inside a novel color puzzle. The importance of making the Action easy gets further explanation from BJ Fogg’s Behavior Model. In sum: we need to automate the four color selection from a user chosen photo. It has to be EASY, in other words, automatic to generate a color palette that best represent a photo.
Currently, it is a four step process for users to choose each color by hand from their picture to create the huedoku color puzzle.
The user wants to be able to adjust colors, but the four dominant colors from the photo must be pre-selected automatically.
The palette should start something like this:
Goal: generate code to locate and identify 4 color tiles that best represent dominant colors in an image.
There are a number of solutions, most namely the one used in the Adobe App called Adobe Capture CC. Whie their code is proprietary, the math and logic have been explored here, listed in chronological order. Not to be distracting from the topic at hand but each are fascinating:
- Color Compatibility from Large Datasets This takes users’ color preferences from Adobe, Colourlovers, and surveys in an attempt to identify a methodology for color preference. No wonder the artists I know always said to shelve the green and pink art pieces before a show.
- According the authors of that report, Sharon Lin who wrote this, was the one to speak with. However, she claimed, over lunch in Palo Alto, that the following report, presented at Sigraph, was the best formula yet to identify the essential colors for a palette from a photo.
- Huiwen Chang, Ohad Fried, Yiming Liu, Stephen DiVerdi, Adam Finkelstein http://gfx.cs.princeton.edu/pubs/Chang_2015_PPR/chang2015-palette_small.pdf
We need this written in Objective C.
And I quote:
To present the most helpful GUI to the
user, we prefer that the algorithm be deterministic, and that palette
colors be far from one another. Thus, instead of randomizing, we
initialize the means as follows. We initialize the first “mean” as
the color ci representing the bin with the largest weight ni. Next
we attenuate all other weights nj by a factor (1 − exp(−d
2 ij/σ2 a)) where dij is the distance in Lab space from ci to cj and σa
expresses a falloff (we use σa = 80 which is 80% of the distance
from black to white, and have found the algorithm to be relatively
insensitive to this parameter). Next we choose bin with the highest
remaining weight ni, repeating until k initial “means” have been
chosen. This approach is deterministic and initializes the k-means
with large clusters that are far from each other.
In laymen’s, terms, I resort to the breadcrumbs presented to me from Tom Denton, who, while refusing my offer to buy him an espresso at the Rockridge coffee boutique, provided this:
To contribute to our Open Source Github on Auto Color visit here.