User:BernhardK/sandbox

{{Infobox election Barnes: {{legend0|#A5B0FF|40–50%}} {{legend0|#7996e2|50–60%}} {{legend0|#6674de|60–70%}} {{legend0|#584cde|70–80%}} {{legend0|#3933e5|80–90%}} {{legend0|#0D0596|>90%}} Tie: {{legend0|#d2b1d9|40–50%}} {{legend0|#ae8bb1|50%}} {{legend0|#808080|No data}} }}
 * election_name = 2022 United States Senate election in Wisconsin
 * country = Wisconsin
 * type = presidential
 * ongoing = no
 * previous_election = 2016 United States Senate election in Wisconsin
 * previous_year = 2016
 * next_election = 2028 United States Senate election in Wisconsin
 * next_year = 2028
 * election_date = November 8, 2022
 * image1 = File:Barnes.png
 * nominee1 = {{color|#0645AD|Mandela Barnes}}
 * color1            = 0000ff
 * party1 = {{color|#0645AD|Democratic}}
 * popular_vote1 = 1,331,543
 * percentage1 = 50.2%
 * image2 = File:Ron.png
 * nominee2 = {{color|#0645AD|Ron Johnson}}
 * color2            = DE0100
 * party2 = {{color|#0645AD|Republican}}
 * popular_vote2 = 1,320,934
 * percentage2 = 49.8%
 * map_image = {{switcher |Wisconsin2022.png
 * map_caption = Johnson: {{legend0|#FFB2B2|40–50%}} {{legend0|#E27F7F|50–60%}} {{legend0|#d75d5d|60–70%}} {{legend0|#D72F30|70–80%}} {{legend0|#C21B18|80–90%}} {{legend0|#A80000|>90%}}
 * title = U.S. Senator
 * before_election = {{color|#0645AD|Ron Johnson}}
 * before_party = {{color|#0645AD|Republican}}
 * after_election = {{color|#0645AD|Mandela Barnes}}
 * after_party = {{color|#0645AD|Democratic}}