I visited both in 2017, without a car. I liked both. Nancy is quite a bit larger, and the Art Nouveau/Art Deco buildings (one of my major interests in visiting) are somewhat scattered. I planned no side-trips outside the city, which seems to be your situation as well. I needed more than one full day in Nancy, but I am sort of obsessive about tracking down early-20th century architecture, and I spent a good deal of time in two of the local museums (Museum of the School of Nancy and Museum of Fine Arts).
Colmar is smaller but there are all those little villages. (On my most recent trip I opted to take the train to Selestat, which is larger, less cutesy, but still attractive and less touristy.) Be sure to allow time to see the Unterlinden Museum in Colmar, which has more to see than just the magnificent Isenheim Altarpiece. Note that Colmar is very touristy. I still liked it a lot, but more than one poster on the forum has been bothered by the crowds. It probably helped that I spent a good bit of time on the side streets, where there was often no other tourist in evidence.
I suspect you will be able to get by with two nights in Nancy, especially if you can finagle an extra half day there either on the day you arrive or on the day you move on to Colmar.
I see that the travel time by train from Nancy to Colmar can be as little as 2 hours or as much as 3-1/2 hours, by the way.