Noir
Noir, the French word for "black", refers to genres or styles within film and literature. The term was applied by French film critics and scholars to American films of the 1940s and 1950s as an assessment of common features and themes.
In literature, noir is usually tied to the PI/detective genre: A mystery told from the perspective of a "hard-boiled" detective, and involving various sordid elements (crime, sex, violence). The story may also have some action elements. Classically these were stories aimed at a "men's audience", seen as too sordid for women. The stories themselves typically had lurid covers, as did other works of pulp fiction, often featuring a woman's leg and the edge of her (very often) red dress -- an homage to the earliest works by Dashiell Hammett (a former Pinkerton-turned-detective who became a leftist activist) and Raymond Chandler. The Maltese Falcon (1930 novel by Dashiell Hammett, 1941 film starring Humphrey Bogart as Sam Spade) is perhaps the most famous example of the genre.
As with other pulp fiction of the time, noir novels often presented, in lurid and critical trappings, a socially and politically conservative message: a pessimistic and often racially cast view of human nature, a virgin/whore view of womanhood, and an emphasis on the need for authority and a few good men to stand against the tide of chaos. Sophisticated works within the genre cut against these trends in various ways: critiquing authority and power, showing people's flaws in connection with their social circumstances, humanizing the "sordid" elements of society, creating real and complex female characters, problematizing the central (male) protagonist in various ways.
The literary creation of the detective/PI needs to be placed in a historical context: Private detectives and agencies were seen as morally ambiguous entities from their inception; they were often known or suspected to be basically protection rackets, with their own ties to local crime syndicates. The late 19th-early 20th century use of Pinkertons