Main branding colors should be consistent - where unique colors will crop up is for things like borders, hover-states, text-shadows that will not necessarily work again in another context.
Coderwall also deliberately has a slightly different color palette for each area of the site so it's not a big surprise to see our colors quickly stack up to the 44 colors the article mentions.
It might be a little excessive to have >100 colors like some of the sites mentioned.
Although a site may have a primary color palette, colors will often look very different in context. Our vision is full of tricks and assumptions that can cause the same color value to look drastically different in different situations. The color in your swatch might look different when used on a different background color, or might not appear as bright when used as a link color, and so on. It's reasonable to expect some variation in the color palette to deal with these issues. Some of these counts seem a bit excessive, though.
True. For dark text on a light background, I have often had to lighten up headlines to make the larger area match the percieved darkness of the body text. (And vice-versa.)
Exactly. Sass/Less have functions to adjust brightness and saturation for just this reason. I routinely tweak saturation so link and hover colors "read" the same on a white background versus even a light grey header.
How is it the site with one of the most conservative designs -- Github -- has by & large the most colors? From memory, I only see a few shades of gray when I picture the site, though I know there's a few colors that accent the UI, but hell, 331 is more than the entire old "web safe palette".
I wonder if there's some sort of anomaly or bug causing the number to be so high... perhaps they use far less images, and instead use CSS instead? Maybe they have a CSS-based color-picker somewhere in their source?
I think there is a bug. I ran it on my own site (http://nickknowlson.com) which is pretty simple in terms of colour. I got a large list of colours (33!) that contains colours I can verify are not in the stylesheet or present anywhere on the page.
EDIT: Nevermind, false alarm. Forgot about the syntax.css file for pygments.
Could some of the 'used once' colors just be a shading or bevel on an element of the main color? Rather than just someone picking a color that is 'close enough'.
I'd bet part of why this happens on some of the more egregious 'offenders' (although it's arguable whether this is actually a problem or not) is the use of CSS preprocessors. It's a lot easier for a designer to add in one-off slight variations to a color when you have something like Compass or LESS's color manipulation functions.
If a site use css gradients with carefully tuned values -say, for glass buttons- they will easily "use" 5-10 colors for each gradient.
It would still look like a solid color + gloss, caustics and shadow, so from a design point of view it might be fair to treat each gradient as one "color".
Interesting. I understand the value of keeping design simple and CSS readable, but are there performance implications (page load times, &c.) to using a large color palette?
Our perception of color varies a lot based on context—size of the swatch, background color, surrounding colors, etc. It is unsurprising that even on sites with a seemingly-consistent color palette, you'd see a lot of variation. Colors that are "the same" will also vary based on how they're being used, e.g. I might use "the same" blue for a highlight as I do for a shadow, but if you look at the RGB values, they're totally different. The reason is that your brain is seeing a shadow, and separating the brightness component (reduced, since it's a shadow), from the color component. Man, isn't your brain incredible.
It would be interesting to take this script and make it so that it does some kind of clustering, or looks at different components of the color—for example, you could just count the hues. One might expect to see a lot variation in lightness, but relatively little in hue, for example. On the other hand, maybe it's not that scientific, and designers just grab a color picker and fiddle until it looks right.
One thing I do is start with something like 5 base colors and then in my stylesheets (with SASS), I lighten or darken those colors.
Using this analysis it would appear that we're all over the place. But in reality there are subtle changes using lighten and darken in sass to address what notJim is talking about in his comment -- "perception of color varies on size, background color, surrounding colors".
Yeah and several websites (google.com for instance) have their stylesheets on the HTML document to reduce the number of http requests, this program does not read them either.
I'm surprised the author chose to visualise this data the way they did. This is crying out for a stacked bar-graph, where each 'bar' is the colour in question, and the height of the bar is the frequency.
This is often due to color profiles. You take a screenshot (or a mockup), grab the color, and use that value. If you didn't explicitly disable color management beforehand, you've created a new color.
Another reason are JPEGs. You get a mockup as JPEG and you use color values from that image.
I recommend to put a list of colors at the top of your primary style sheet. That's where others will look for it.
You ought to choose a palette that is as small as possible while remaining versatile. Each entry should serve a distinct purpose, and should look different (and look good) next to various other entries.
For example: a mid-saturation, mid-lightness violet, say around #793D58, can be used as (1) a dark background for light elements, (2) a text or link colour on a light background, or (3) a shadow for bluish or reddish elements. Knowing how colours are perceived, and how to use them well, drastically reduces the size of a palette—the vast majority of pixel art uses fewer than 20 colours, and fewer than 10 is common.
In particular, there is usually no need to create ad-hoc colours for different contexts, such as with LESS colour transformations. These can be useful tools, but they can also create inconsistency because they take control out of your hands. And when it comes to design, I for one prefer not to leave things to chance.
33 comments
[ 1.3 ms ] story [ 84.9 ms ] threadCoderwall also deliberately has a slightly different color palette for each area of the site so it's not a big surprise to see our colors quickly stack up to the 44 colors the article mentions.
It might be a little excessive to have >100 colors like some of the sites mentioned.
You can use, http://cutycapt.sourceforge.net/ to render the site into png, and analyze the pixels from it.
I wonder if there's some sort of anomaly or bug causing the number to be so high... perhaps they use far less images, and instead use CSS instead? Maybe they have a CSS-based color-picker somewhere in their source?
I can sleep now!
EDIT: Nevermind, false alarm. Forgot about the syntax.css file for pygments.
Agree that if you've got well defined color variables setup the preprocessor route is potentially simpler.
It would still look like a solid color + gloss, caustics and shadow, so from a design point of view it might be fair to treat each gradient as one "color".
It would be interesting to take this script and make it so that it does some kind of clustering, or looks at different components of the color—for example, you could just count the hues. One might expect to see a lot variation in lightness, but relatively little in hue, for example. On the other hand, maybe it's not that scientific, and designers just grab a color picker and fiddle until it looks right.
Using this analysis it would appear that we're all over the place. But in reality there are subtle changes using lighten and darken in sass to address what notJim is talking about in his comment -- "perception of color varies on size, background color, surrounding colors".
so actually this software it's just to extract color palette from CSS files
Good job.
Another reason are JPEGs. You get a mockup as JPEG and you use color values from that image.
I recommend to put a list of colors at the top of your primary style sheet. That's where others will look for it.
You ought to choose a palette that is as small as possible while remaining versatile. Each entry should serve a distinct purpose, and should look different (and look good) next to various other entries.
For example: a mid-saturation, mid-lightness violet, say around #793D58, can be used as (1) a dark background for light elements, (2) a text or link colour on a light background, or (3) a shadow for bluish or reddish elements. Knowing how colours are perceived, and how to use them well, drastically reduces the size of a palette—the vast majority of pixel art uses fewer than 20 colours, and fewer than 10 is common.
In particular, there is usually no need to create ad-hoc colours for different contexts, such as with LESS colour transformations. These can be useful tools, but they can also create inconsistency because they take control out of your hands. And when it comes to design, I for one prefer not to leave things to chance.