Allied Vision Distributor - allied vision cameras
Descriptions and documentation should be written dark over light. Code examples should be written in light over dark. Additionally, the same color should be used for each type of code described.
Added side note, the 50% statistic is plain wrong, I have just looked at a fair number of studies and all sources I have just seen are givings numbers below 35%. Add to that that not everyone with astigmatism has a problem with this (e.g. I) and you get to the point where you are talking about less than 25% of your users probably. Is that a lot? Definitely, but it does put it into perspective.
I think the best way to share code-snippets is to style them the same way as the IDE does. Since different developers use different IDE's, this can differ from user to user. Maybe a pull-down with the option 'render like [name IDE]' could be a solution. Saving this in a cookie or something would make thing easier for the user when viewing more snippets.
Which would work better for a technical site: dark backgrounds with light colour fonts or light backgrounds with dark fonts?
The vast majority of visible objects are seen primarily by diffuse reflection from their surface.[7][8] Exceptions include objects with polished (specularly reflecting) surfaces, and objects that themselves emit light. Rayleigh scattering is responsible for the blue color of the sky, and Mie scattering for the white color of the water droplets in clouds.
I would suggest creating both and let the user decide. An example I can think of is last.fm which 'playfully' let you change the look of the website. Although for last.fm it isn't really a necessity.
Diffuse illuminationeye
While, for my eyes and designing skills, dark backgrounds and light text works way better for me. A few clients have said that that does not work at all for the type of site which I have created.
I realize color preference here is a strong preference for a lot of people. Some like it one way, others like it the other. Those who prefer their computer screen mostly dark with light color text have, in my experience, a very strong preference. In the other direction degree of conviction about their preference may vary. I have no statistics on this as to which is more popular, but it's certainly quite subjective.
If you are stare into a light for some 8 odd hours a day, opticians suggests a light on dark colour scheme, it is easier on the eyes to have light-on-dark colour schemes.
For simplicity, "reflections" are spoken of here, but more generally the interface between the small particles that constitute many materials is irregular on a scale comparable with light wavelength, so diffuse light is generated at each interface, rather than a single reflected ray, but the story can be told the same way.
Diffuse interreflection is a process whereby light reflected from an object strikes other objects in the surrounding area, illuminating them. Diffuse interreflection specifically describes light reflected from objects which are not shiny or specular. In real life terms what this means is that light is reflected off non-shiny surfaces such as the ground, walls, or fabric, to reach areas not directly in view of a light source. If the diffuse surface is colored, the reflected light is also colored, resulting in similar coloration of surrounding objects.
Diffuse reflection is the reflection of light or other waves or particles from a surface such that a ray incident on the surface is scattered at many angles rather than at just one angle as in the case of specular reflection. An ideal diffuse reflecting surface is said to exhibit Lambertian reflection, meaning that there is equal luminance when viewed from all directions lying in the half-space adjacent to the surface.
Diffuse reflectance spectroscopy can be used to determine the absorption spectra of powdered samples in cases where transmission spectroscopy is not feasible. This applies to UV-Vis-NIR spectroscopy or mid-infrared spectroscopy.[9][10]
And as others have already pointed out, inverting your screen colors is always an option, should you go with the color scheme you don't prefer.
I don't think there is such a thing as 'best styling' for a particular group or field of websites. As you said yourself, two people that use the same document/website can have very different perceptions on what works best.
The most general mechanism by which a surface gives diffuse reflection does not involve exactly the surface: most of the light is contributed by scattering centers beneath the surface,[2][3] as illustrated in Figure 1. If one were to imagine that the figure represents snow, and that the polygons are its (transparent) ice crystallites, an impinging ray is partially reflected (a few percent) by the first particle, enters in it, is again reflected by the interface with the second particle, enters in it, impinges on the third, and so on, generating a series of "primary" scattered rays in random directions, which, in turn, through the same mechanism, generate a large number of "secondary" scattered rays, which generate "tertiary" rays, and so forth.[4] All these rays walk through the snow crystallites, which do not absorb light, until they arrive at the surface and exit in random directions.[5] The result is that the light that was sent out is returned in all directions, so that snow is white despite being made of transparent material (ice crystals).
This is normally down to personal preference. For example, where I work, several people have a dark background/light text setting enabled; on the other hand, I prefer to work with light background/dark text.
We learn to read with dark ink on light paper, and even day-to-day, most of our reading is in that mode. Therefore, most people are going to prefer dark-on-light. So long as the contrast is reasonably high, the characters crisp, and the white background not excessively bright (glare), most people will be happy with it. Light-on-dark is just a holdover from the days of early text-only terminals (IBM 3270, etc.), and some people still like it. If you can satisfy both parties with configurability, great. If not, I'd go with dark-on-light unless you get feedback from your intended audience that they prefer light-on-dark.
Diffuse illuminationslit lamp
Diffusion affects the color of objects in a substantial manner because it determines the average path of light in the material, and hence to which extent the various wavelengths are absorbed.[6] Red ink looks black when it stays in its bottle. Its vivid color is only perceived when it is placed on a scattering material (e.g. paper). This is so because light's path through the paper fibers (and through the ink) is only a fraction of millimeter long. However, light from the bottle has crossed several centimeters of ink and has been heavily absorbed, even in its red wavelengths.
As for documentation, I think most rules of typography apply here. In my experience most documentation is black on white, but I have very little experience with documentation.
Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Diffused lighting living room
This mechanism is very general, because almost all common materials are made of "small things" held together. Mineral materials are generally polycrystalline: one can describe them as made of a 3D mosaic of small, irregularly shaped defective crystals. Organic materials are usually composed of fibers or cells, with their membranes and their complex internal structure. And each interface, inhomogeneity or imperfection can deviate, reflect or scatter light, reproducing the above mechanism.
Diffuselight vs direct light
Second use case. I actually do this a lot. I'm trying to gather a bunch of information on a particular topic, so I copy and paste segments that are relevant into a word document. I then later, condense it down into notes or whatever. When you use "reverse" colors, I get annoyed. Instead of code that's pretty-printed in IDE-like colors that will be legible in a word document, I have colors that are hard to read on a white background and print poorly, and I'm going to have to manually change all the colors.
Diffuselight bulb
Most materials can give some specular reflection, provided that their surface can be polished to eliminate irregularities comparable with the light wavelength (a fraction of a micrometer). Depending on the material and surface roughness, reflection may be mostly specular, mostly diffuse, or anywhere in between. A few materials, like liquids and glasses, lack the internal subdivisions which produce the subsurface scattering mechanism described above, and so give only specular reflection. Among common materials, only polished metals can reflect light specularly with high efficiency, as in aluminum or silver usually used in mirrors. All other common materials, even when perfectly polished, usually give not more than a few percent specular reflection, except in particular cases, such as grazing angle reflection by a lake, or the total reflection of a glass prism, or when structured in certain complex configurations such as the silvery skin of many fish species or the reflective surface of a dielectric mirror. Diffuse reflection can be highly efficient, as in white materials, due to the summing up of the many subsurface reflections.
For a very technical site documenting code, sharing code snippets, and documentation, I have been told that using dark fonts on light backgrounds is recommended for people being able to read the information clearly as possible.
Rather than the other answers that just express personal opinions let me direct you to this article that in turn cites some actual research which I will quote here as well:
DiffuseLight Ceiling
In 3D computer graphics, diffuse interreflection is an important component of global illumination. There are a number of ways to model diffuse interreflection when rendering a scene. Radiosity and photon mapping are two commonly used methods.
Up to this point white objects have been discussed, which do not absorb light. But the above scheme continues to be valid in the case that the material is absorbent. In this case, diffused rays will lose some wavelengths during their walk in the material, and will emerge colored.
Overall giving the user the choice might still be a good idea, although maintaining 2 separate designs never is fun. An alternative is directing them to screen inversion tools. True, it's not the nicest solution, but it can at least solve the issue for those with extreme astigmatism.
The visibility of objects, excluding light-emitting ones, is primarily caused by diffuse reflection of light: it is diffusely-scattered light that forms the image of the object in an observer's eye over a wide range of angles of the observer with respect to the object.
There are a couple advantages to black on white. One is printing. If I find a really good snippet, I might want to print it out and pin in on the wall next to my workstation for handy reference. I might also print out a longer article to read on the bus/airplane/in bed/wherever so I can take notes and highlight on it as I read. Those are just a couple of many use cases for why a user would want to print. But in general, black on white will use significantly less ink or toner. If you do white on black, certain browsers will print the text in pale gray on white (because it's default is to not print the background color). Not legible.
Diffused lighting interior design
Furthermore, I'm making the assumption that you prefer dark backgrounds with light text because you've worked with command prompts and terminals for quite a while. This Article doesn't quite answer your question directly, but gives you a way of thinking on what would work best for different types of users. Not all users on a technical website will be used to a terminal screen, for example.
Just because you prefer light-on-dark is no excuse to force it on everyone else, unless they've told you they prefer it. I suspect that you're in the minority in preferring light-on-dark. Configurable foreground and background colors are ideal, with black-on-white being a good default.
It depends on the user, personally I suffer from a somewhat rare medical condition called palinopsia which affects my vision and the symptoms are much worse when looking at bright coloured objects on a dark coloured background (lime on black being the worst). So for me personally, I'd choose dark text on a bright background every time.
So you go ahead and say, great, I want to make it print nicer, I'll make a print stylesheet with inverted colors. It will only be white on black on the screen, when you print the colors will be reversed to print well.
Few materials do not cause diffuse reflection: among these are metals, which do not allow light to enter; gases, liquids, glass, and transparent plastics (which have a liquid-like amorphous microscopic structure); single crystals, such as some gems or a salt crystal; and some very special materials, such as the tissues which make the cornea and the lens of an eye. These materials can reflect diffusely, however, if their surface is microscopically rough, like in a frost glass (Figure 2), or, of course, if their homogeneous structure deteriorates, as in cataracts of the eye lens.
I have to admit that I am surprised this is the case as I have light astigmatism and yet still prefer white on black, so there definitely is some preference factor here still, but it seems that black on white is actually better which I always believed to be an artifact from printing times when it was and is cheaper to print black on white. (auch, as one of my applications is white on black in android style).
You have to ask yourself what the reader is going to be looking for. Is an experienced coder actually going to forget his curly braces? Well, that's not a big issue. A big issue will be if it takes him longer than ten seconds to locate the information he is looking for when he is referencing or if it slows him down at all when he is studying.
People with astigmatism (aproximately 50% of the population) find it harder to read white text on black than black text on white. Part of this has to do with light levels: with a bright display (white background) the iris closes a bit more, decreasing the effect of the "deformed" lens; with a dark display (black background) the iris opens to receive more light and the deformation of the lens creates a much fuzzier focus at the eye.
Diffuselight example
And, when a colored object has both diffuse and specular reflection, usually only the diffuse component is colored. A cherry reflects diffusely red light, absorbs all other colors and has a specular reflection which is essentially white (if the incident light is white light). This is quite general, because, except for metals, the reflectivity of most materials depends on their refractive index, which varies little with the wavelength (though it is this variation that causes the chromatic dispersion in a prism), so that all colors are reflected nearly with the same intensity.
Since you appear to really prefer light on dark, I'll point out that it is not difficult to accommodate both preferences. Swapping style-sheets at runtime, or having a user cookie to set style sheet preference is easy to do. Making your images look great on both light and dark backgrounds is slightly more work, but is not impossible either, so long as the consideration is made as the images are created so you don't end up with "glowing shadows" or the like.
A surface may also exhibit both specular and diffuse reflection, as is the case, for example, of glossy paints as used in home painting, which give also a fraction of specular reflection, while matte paints give almost exclusively diffuse reflection.
Diffuse reflection from solids is generally not due to surface roughness. A flat surface is indeed required to give specular reflection, but it does not prevent diffuse reflection. A piece of highly polished white marble remains white; no amount of polishing will turn it into a mirror. Polishing produces some specular reflection, but the remaining light continues to be diffusely reflected.
However, most studies have shown that dark characters on a light background are superior to light characters on a dark background (when the refresh rate is fairly high). For example, Bauer and Cavonius (1980) found that participants were 26% more accurate in reading text when they read it with dark characters on a light background.
Additionally, choice of colors may to some people be an indicator of professionalism or conformance to expectation. Lots of news sites, professional sites, even stack exchange, for better or worse, use white on black, not the reverse.
A surface built from a non-absorbing powder such as plaster, or from fibers such as paper, or from a polycrystalline material such as white marble, reflects light diffusely with great efficiency. Many common materials exhibit a mixture of specular and diffuse reflection.