The color is named after the flower
Ask which came first, the color pink or the flower called a pink, and nearly everyone answers the wrong way round. The flower is older. Small fringed dianthus were being called pinks in English well before the word meant a color at all, and the color took its name from them in the seventeenth century.
What the flower was named for is the edge of its petals. To pink something is to cut it with a notched or serrated edge, which is the same verb that gives pinking shears their name, and the petals of these flowers look exactly as though somebody has run a pair down each one. The plant was named for how it was cut, and a color was named after the plant.
The scientific name went the other way and aimed high. Dianthus is from the Greek for the flower of Zeus, given by Theophrastus more than two thousand years ago, which makes it one of the oldest plant names still in use for the plant it was coined for.