In the pink
In perfect condition, especially of health.
The general usage of this phrase has altered somewhat since it first entered the language. We now usually see it with the specific meaning of 'the pink of condition', that is, in the best possible health. It is tempting but, as it turns out, misguided, to assume an association between 'the pink of condition' and the healthily glowing pink cheeks of new-born babies or energetic sportsmen/sportswomen and the like.
The earliest citations of 'in the pink' are from the 16th century and, at that time, the meaning was 'the very pinnacle of something', but not necessarily limited to health. The earliest example that I can find of pink being used with that meaning is from 1597 Shakespeare's Romeo & Juliet, 1597:
Mercurio: Why, I am the very pinke of curtesie.
The earliest citation I've found for 'in the pink' is from Leigh's Kensington Gardens, 1720:
"'Tis the Pink of the Mode, to marry at first Sight: - And some, indeed, marry without any Sight at all."
The 'pink of the mode', that is, the acme of excellence of fashion, was a common early usage and continued to be used throughout the 19th century, as here from Thackeray, 1840:
"In the very pink of the mode."
Dickens, in his Letters, 1845, demonstrates the difference from our current usage:
"Of all the picturesque abominations in the World, commend me to Fondi. It is the very pink of hideousness and squalid misery."
It isn't until the 20th century that we find the phrase in the 'pink of condition' form that is currently used, in the Kynoch Journal, 1905:
"Makers may despatch explosives from the factory in the pink of condition."
The association of the phrase 'in the pink' with the so-called pink jackets worn by the UK fox-hunting aficionados is unproven. The jackets, which are in fact scarlet, have been said to have derived their 'hunting pink' name from a tailor called Thomas Pink and that 'in the pink' refers to both the jackets and to the healthy, energetic approach to the pastime that many hunters adopt. Fox-hunters can be said to be literally in the pink but the hunting derivation is nevertheless far-fetched. There are no historical records of any such Thomas Pink and his association with the fox-hunting fraternity wasn't suggested until long after the first references to pink jackets.
Why pink has been chosen to epitomise the pinnacle of quality is more likely to do with the Dianthus flower, many varieties of which are called Pinks. It is known that society in the reign of Elizabeth I admired the flowers, hence the first uses of pink with the 'excellent' meaning in that period.
What is interesting to speculate on is why the flowers were called Pinks. You may think that a silly question, as Dianthuses are almost always pink. There are two quite believable theories. One suggests, that it is the flowers that gave their name to the colour, rather than vice-versa, and that the name derives from the Dutch 'pinck-ooghen' - 'little eye' (literally - to blink). The second theory is based on the earlier verb form of pink, which means to cut or to pierce - in a style that would now be done using pinking shears. Dianthuses are said to be called Pinks because their edges are pinked. Take your choice.