"I don't know what type they are" - Those are hydrangea macrophyllas. They come in two flavors, depending on the type of blooms. Your blooms are called mopheads. They usually have mostly sterile flowers. Those that are not white blooms, their bloom color is controlled by soil that is acidic (a shade of blue flowers), near neutral (a shade of purple flowers) or alkaline (a shade of pink flowers), the amount of aluminum in the soil and by the variety.
"On sunny days they are in the sun from around 1pm to late evening." - You should typically give these plants morning sun only, dappled sun or full -but very bright- shade.
"the stems are going brown and the leaves are purple." - Hydrangeas are woody plants. New growth (that is, new stems or new growth on top of old stems) will start the season being green. Then as time passes, the stems turn various colors too.They may turn brown or sandy or grey as they get older, as the plant hardens in preparation for winter or as the stems lack enough water. Your stems look ok. But the leaves look like they got hit by very cold temperatures as a result of a late frost. That usually requires temperatures going down slightly above 0C. The leaves then turn various colors depending on the damage. You can see some red, oranges, purples. Eventually, some of the damaged sections of leaves turn brown and the rest stays green. Other times, the plant turns the whole leaf brown and drops the leaf.
"The pink one is wilting and the stem is beginning to go brown although looks far better than the blue." - Hydrangeas macrophyllas, with those large leaves, can be very sensitive to heat stress. Afternoon or evening sun, hot days, windy days, temperatures above 29C, low humidity, lack of water... all of these things can affect them and more so when summer arrives. When they loose leaf moisture faster than the roots can absorb more water, the leaves wilt but the plant will recover on its own if you maintain the soil as evenly moist as you can. They should appear perky looking in the morning. If not then the soil did not have enough moisture and you should water them right away. When planted in the ground, you should put some organic mulch to protect the roots from temperature extremes (cold in winter; hot in summer) and to minimize the loss of water due to windy or hot conditions. Some leaves in the pink one look like they also got hit by a late frost.
You can remove the leaves that look bad (the worst ones) but always be aware that green leaves are producing food for the roots so sometimes it is best to leave them "on" and let the plant decide if it wants to drop the leaves if the frost damage is too much or not. When cutting the leaves, it is important to be aware that the flower buds are invisible, located inside the stems so cut the petiole string that connects the leaf to the stem and never cut the stem or you may be cutting off the yet unopened flowers. Feel free to bring the plants temporarily inside when late frosts are announced. Late frosts can kill parts of a leaf or all, parts of the stems or all but rarely they would affect the roots. It will help the roots if you water deeply before late frosts or if you shelter the plant for a day or so.
Some hydrangea macrophylla varieties are not very winter hardy or disease resistant but are useful for the florist trade. The ones sold at grocery stores or at florists are varieties that they want you to enjoy when they are in bloom and then dispose of them (or throw them in the compost pile) and hopefully buy a replacement. These varieties tend to have some "deficiencies" (they may not grow a lot, the leaves may be susceptible to powdery mildew, etc. but are basically produce lots of blooms. However, nothing says you cannot plant them outside and keep them for years (if your local conditions allow for that). I saw a nice blooming hydrangea at a grocery store and decided to keep it and that was 10 years ago or more. It is very sensitive to low temperatures (which means I have to winter protect because otherwise the flower buds can be zapped in winter) and does not bloom well if temps get too cold but, I know that and expected that so it is doing well in a corner of the yard.
The blooms will go through a plethora of color changes as they mature. For example, the shade of blues will -after several weeks or months- get a tinge of greens, then maybe add some shades of pink/red/purple splotches, then turn brown. Exactly what the sequence is depends on many things like soil minerals and the variety. Once they are brown, you can leave the blooms there and they will eventually fall down in winter or spring. Or you can cut the peduncle string that connects the bloom to the stem.
Pictures 2 and 3 also show leaf damage from a late frost. Although not happening now, those stems that you pruned (or someone pruned) in picture 3 will dry out some more so do not panic: the inner, central part of the stem will develop a hollow look but that does not mean that there is a borer insect causing damage.I
The blue one currently has a potting mix that yields blue blooms. As you water the plants, minerals that make the blooms blue will leech out and make the future blooms a shade of pink. By the way, invisible flower buds develop in mid to late summer and will open in the spring looking like tiny broccoli heads.
"The soil for both is moist." - maintain the soil as evenly moist as you can. Expect the leaves to wilt when it gets above 29C or so. Feel free to move the pots so they get morning sun only though. Your temps should be mild in the summer so if they were to show wilting signs, then the soil to make sure it is moist so they will recover on their own. You can water them multiple times in a day sometimes but do this carefully as they might develop root rot when the roots are in soggy soils for "too long".
"Have I killed these beautiful plants?" - not even close. They look fine.