Sailors had been wearing the looser fit work trousers since the 1580s since they allowed them to roll up the legs for wading ashore or climbing rigging. In 1846 Sir Harry Lumsden , commanding an English troop in Punjab, India traded in his bright white trousers for pajama bottoms to find relief from the heat. To disguise them he colored them to blend with the local terrain using mazari, a native plant. As a by product, Lumsden discovered that the new Khaki pants were more suitable in battle than the white pants, and red tunic. Blending in was good.
Khaki is a color, but is now synonymous with a military twill pant.
Khaki went from India to the Kaffir War in South Africa in 1851, and then after the Sudan Wars and Afghan Campaign of 1878 it was adopted in 1884 as the official uniform. The same year Khaki-color dye was patented. It soon was adopted by other armies including America for the Spanish-American War in 1898. The British Khakis found their way into China where they were duplicated and sold to American soldiers in the Philippines for uniforms. Chinos don't have to be twill, but are often a firm weave of cotton.