The flute items only have an effect in Gen 3 and 4 (plus OR/AS), and don't exist in Gen 7+. The effects are: Blue Flute — Recovers a Pokemon from sleep. Yellow Flute — Snaps a Pokemon out of confusion. Red Flute — Snaps a Pokemon out of infatuation. Black Flute — Reduces wild encounter rate by 50%. White Flute — Increases wild ... More @Wikipedia
Hover over any link to get a description of the article. Please note that search keywords are sometimes hidden within the full article and don't appear in the description or title.