unity-design team mailing list archive
-
unity-design team
-
Mailing list archive
-
Message #09517
Re: Chameleonic theme
Thanks for that insight! I thought I had read somewhere that it just
matches the centre pixel, so this is really useful.
I agree that this is broken at the moment. As you say, it gives extra
weighting to diagonal lines (not good news for potential patriots with a
diagonal cross flag haha), which may not be representative of the
background. I'd be interested to have a look to see how GIMP works when
it indexes images down to two colours (two is the minimum it can do).
Perhaps we could use something similar?
For now I will use the existing algorithm such that the theme tries to
match the colour chosen by Unity
Thanks for the heads up!
Matt
On 22/05/12 19:28, Alan Bell wrote:
I believe the current chameleonic algorithm is a bit broken. I was
trying to trace what it actually does, it looks at the 4 corners of
the screen and the center spot, then if there is much of a difference
it recursively does this for each quadrant in turn until the points
are roughly even in colour. This sounds good in theory, and works
reasonably well in practice, but it overemphasises a diagonal cross in
the center of the screen and basically diagonal lines growing from
each point it looks at. There is probably a much better algorithm that
could be dropped in, perhaps just one sampling 16 random points or
points on a grid would be just as good in effect and would run in a
shorter, constant, time. Currently if the center point and 4 corners
match then it stops very fast, but doesn't see any variations
elsewhere in the image, for other images it will recursively average
quite a lot of points.
Alan.
References