Melanin is the only biologically coded for pigment amongst mammals and most animals broadly speaking. Some birds are exceptional in this case where reds and greens can be seen (in which case often some dietary component is required for the synthesis of these abnormal pigments).
In humans, the entire variation in skin, hair, and eye color is a consequence of varying treatments of melanin. Melanin traditionally comes in two forms, namely eumelanin and phaeomelanin. The former can come in a brown or black variety while the latter is responsible for the reds and oranges seen in human pigmentation (e.g., localized to the lips, nipples, and nether regions).
Red pheomelanin serves as an accent and does very little as far as protection from UV radiation is concerned; the brown-black melanin serves that purpose. The cells in your body that produce melanin are known as melanocytes, and the MC1R gene you mentioned codes for a receptor that localizes to the membrane of these cells. This receptor acts as a light switch that indicates whether the melanocyte ought to be producing red pheomelanin or brown-black eumelanin. An agonist that binds to this receptor is coded for by the ASIP gene and is also partially responsible for pigmentation differences throughout the animal kingdom.
In most people this receptor functions as intended, and melanocytes in the skin produce varying degrees of brown-black eumelanin (the extent of which depending on one's ethnic background) while pheomelanin is switched on in the few key areas listed above. When both copies of the MC1R gene inherited from each of your parents are disfunctional, this switching mechanism no longer works and your melanocytes will produce primarily pheomelanin ubiquitously across your body. This is what we know as 'redheads'.
What isn't immediately obvious is that red-haired individuals are not unique in just the aspect of their hair. Their whole body presents with a deficiency in eumelanin and as such they also carry a pale/rosy complexion as well as an inability to tan and a propensity to sunburn easily. This is a consequences of the fact that eumelanin is our primary defense against UV radiation.
While melanocytes in the skin and eyes are responsible for the production of melanin, the melanin in one's hair gets there as a result of a handoff between melanocytes and the keratin producing keratinocytes. Melanin within melanocytes is produced and stored within organelles known as melanosomes and, through a complex formed by the 3 genes MYO5A, RAB27A, and MLPH, the transfer of these melanosomes through the tendrils of the melanocytes to the keratinocytes is facilitated. Defects in any of these 3 genes can result in a condition known as Griscelli syndrome (types 1, 2, and 3, respectively) where the transfer of melanin from melanocytes to keratinocytes is impaired.

As a consequence the hair of one of these individuals appears silver, and when looked at under a microscope you can see the inconsistent nature of the melanin being transferred to the hair during its development:

To summarize, the only pigment that appears in hair is melanin, and thus the only possible hair colors are: the entire spectrum between blond and black; red in the case of MC1R defects; silver in the case of the Griscelli syndromes; and of course white in the case of albinism (which I needn't cover).

You mentioned blue hair color but I think this might be due to a misconception about how blue eyes came to be. Blue eyes are not due to a blue pigment (rarely is blue ever found in nature), but rather due to a physical manipulation of the light being reflected due to the microscopic structure of the eye. So in the same way that the sky and water can appear blue due to manipulation of light, so can the human eye. The blue of human eyes is typically covered up by melanin, except in the case of those carrying a specific one-letter mutation within the HERC2 gene that results in the absence of melanin in the eye.
Not just black and white: pigment pattern development and evolution in vertebrates
Signaling Pathways in Melanogenesis
Rab27a and MyoVa are the primary Mlph interactors regulating melanosome transport in melanocytes