Military camouflage
Principles: Military camouflage is part of the art of military deception. The main objective of military camouflage is to deceive the enemy as to the presence, position and intentions of military formations. Camouflage techniques include concealment, disguise, and dummies, applied to troops, vehicles, and positions.
Vision is the main sense of orientation in humans, and the primary function of camouflage is to deceive the human eye. Camouflage works through concealment (whether by countershading, preventing casting shadows, or disruption of outlines), mimicry, or possibly by dazzle. In modern warfare, some forms of camouflage, for example face paints, also offer concealment from infrared sensors, while CADPAT textiles in addition help to provide concealment from radar.

Compromises: While camouflage tricks are in principle limitless, both cost and practical considerations limit the choice of methods and the time and effort devoted to camouflage. Paint and uniforms must also protect vehicles and soldiers from the elements. Units need to move, fire their weapons and perform other tasks to keep functional, some of which run counter to camouflage. Camouflage may be dropped altogether. Late in the Second World War, the USAAF abandoned camouflage paint for some aircraft to lure enemy fighters to attack, while in the Cold War, some aircraft similarly flew with polished metal skins, to reduce drag and weight, or to reduce vulnerability to radiation from nuclear weapons.
No single camouflage pattern is effective in all terrains. The effectiveness of a pattern depends on contrast as well as colour tones. Strong contrasts which disrupt outlines are better suited for environments such as forests where the play of light and shade is prominent, while low contrasts are better suited to open terrain with little shading structure. Terrain-specific camouflage patterns, made to match the local terrain, may be more effective in that terrain than more general patterns. However, unlike an animal or a civilian hunter, military units may need to cross several terrain types like woodland, farmland and built up areas in a single day. While civilian hunting clothing may have almost photo-realistic depictions of tree bark or leaves (indeed, some such patterns are based on photographs), military camouflage is designed to work in a range of environments. With the cost of uniforms in particular being substantial, most armies operating globally have two separate full uniforms, one for woodland/jungle and one for desert and other dry terrain. An American attempt at a global camouflage pattern for all environments (the 2004 UCP) was produced, however after a few years of service it was withdrawn due to poor performance. On the other end of the scale are terrain specific patterns like the "Berlin camo", applied to British vehicles operating in Berlin during the Cold War, where square fields of various gray shades was designed to hide vehicles against the mostly concrete architecture of post-war Berlin.

Other functions: Camouflage patterns serve cultural functions alongside concealment. Apart from concealment, uniforms are also the primary means for soldiers to tell friends and enemies apart.  The camouflage experts and evolutionary zoologists L. Talas, R. J. Baddeley and Innes Cuthill analyzed calibrated photographs of a series of NATO and Warsaw Pact uniform patterns and demonstrated that their evolution did not serve any known principles of military camouflage intended to provide concealment.  Instead, when the Warsaw Pact was dissolved, the uniforms of the countries that began to favour the West politically started to converge on the colours and textures of NATO patterns. After the death of Marshal Tito and the breakup of what had been Yugoslavia, the camouflage patterns of the new nations changed, coming to resemble the camouflage patterns used by the armies of their neighbours. The authors note that military camouflage resembles animal coloration in having multiple simultaneous functions.

Snow camouflage: Seasons may play a role in some regions. A dramatic change in colour and texture is created by seasonal snowy conditions in northern latitudes, necessitating repainting of vehicles and separate snow oversuits. The Eastern and northern European countries have a tradition for separate winter uniforms rather than oversuits. During the Second World War, the Waffen-SS went a step further, developing reversible uniforms with separate schemes for summer and autumn, as well as white winter oversuits.

Movement: While patterns can provide more effective crypsis than solid colour when the camouflaged object is stationary, any pattern, particularly one with high contrast, stands out when the object is moving. Jungle camouflage uniforms were issued during the Second World War, but both the British and American forces found that a simple green uniform provided better camouflage when soldiers were moving. After the war, most nations returned to a unicoloured uniform for their troops. Some nations, notably Austria and Israel, continue to use solid colour combat uniforms today. Similarly, while larger military aircraft traditionally had a disruptive pattern with a darker top over a lighter lower surface (a form of countershading), modern fast fighter aircraft often wear gray overall.

Digital camouflage: Digital camouflage provides a disruptive effect through the use of pixellated patterns at a range of scales, meaning that the camouflage helps to defeat observation at a range of distances. Such patterns were first developed during the Second World War, when Johann Georg Otto Schick designed a number of patterns for the Waffen-SS, combining micro- and macro-patterns in one scheme. The German Army developed the idea further in the 1970s into Flecktarn, which combines smaller shapes with dithering; this softens the edges of the large scale pattern, making the underlying objects harder to discern. Pixellated shapes pre-date computer aided design by many years, already being used in Soviet Union experiments with camouflage patterns, such as "TTsMKK" developed in 1944 or 1945.
In the 1970s, US Army officer Timothy R. O'Neill suggested that patterns consisting of square blocks of colour would provide effective camouflage. By 2000, O'Neill's idea was combined with patterns like the German Flecktarn to create pixellated patterns such as CADPAT and MARPAT. Battledress in digital camouflage patterns was first designed by the Canadian Forces. The "digital" refers to the coordinates of the pattern, which are digitally defined. The term is also used of computer generated patterns like the non-pixellated Multicam and the Italian fractal Vegetato pattern. Pixellation does not in itself contribute to the camouflaging effect. The pixellated style, however, simplifies design and eases printing on fabric.

Non-visual: With the birth of radar and sonar and other means of detecting military hardware not depending on the human eye, came means of camouflaging against them. Collectively these are known as stealth technology. Aircraft and ships can be shaped to reflect radar impulses away from the sender, and covered with radar-absorbing materials, to reduce their radar signature. The use of heat-seeking missiles has also led to efforts to hide the heat signature of aircraft engines. Methods include exhaust ports shaped to mix hot exhaust gases with cold surrounding air, and placing the exhaust ports on the upper side of the airframe. 
Multi-spectral camouflage attempts to hide objects from several detection methods such as infrared, radar, ultraviolet, and millimetre-wave imaging simultaneously. As of 2018, multiple countries are phasing out legacy camouflage systems with multi-spectral systems.
Auditory camouflage, at least in the form of noise reduction, is practised in various ways. The rubberized hull of military submarines absorbs sonar waves and can be seen as a form of auditory camouflage. Some modern helicopters are designed to be quiet. Combat uniforms are usually equipped with buttons rather than snap fasteners or velcro to reduce noise.
Olfactory camouflage is said to be rare; examples include ghillie suits, special garments for military snipers made from strips of hessian cloth, which are sometimes treated with mud and even manure to give them an "earthy" smell to cover the smell of the sniper.
Magnetic camouflage in the form of "degaussing" coils has been used since the Second World War to protect ships from magnetic mines and other weapons with magnetic sensors. Horizontal coils around the whole or parts of the ship generate magnetic fields to "cancel out" distortions to the Earth's magnetic field created by the ship.

History: 

Reconnaissance and riflemen: Ship camouflage was occasionally used in ancient times.  Vegetius wrote in the 4th century that "Venetian blue" (bluish-green, like the sea) was used for camouflage in the years 56–54 BC during the Gallic Wars, when Julius Caesar sent his scout ships to gather intelligence along the coast of Britain. The bluish-green scout ships carried sailors and marines dressed in the same colour.
In the Mughal Empire that ruled South Asia between the 16th and 18th centuries, the Mughal army frequently employed the use of camouflage in their military campaigns, foreshadowing the modern use of military camouflage in the 19th and 20th centuries.
The emphasis on hand-to-hand combat, and the short range of weapons such as the musket, meant that recognition and cohesion were more important than camouflage in combat clothing well into the baroque period. The introduction of infantry weapons with longer range, especially the Baker rifle, opened up new roles which needed camouflaged clothing. In the colonial Seven Years' War (1756–1763), the rifle-armed Rogers' Rangers wore gray or green uniforms. John Graves Simcoe, one of the unit's later commanders, noted in 1784:

Green is without comparison the best colour for light troops with dark accouterments; and if put on in the spring, by autumn it nearly fades with the leaves, preserving its characteristic of being scarcely discernible at a distance.