This claim is partially false.
The claim that dogs can only see black and white comes from Will Judy, a publisher and writer of dog-related pieces, claiming dogs had poor vision and were able to see single shades and tones.
According to Jay Neitz, running the Neitz Color Vision Lab in the Department of Ophthalmology and the University of Washington, "scientists now believe that a dog's color vision is similar to that of a person who has red-green color blindness".
The article discusses how "dogs have more rods than cones in their retina...this makes the difference in color perception" due to dogs only having two types of cones. Each type of cone registers a different light wavelength and, dogs are missing red-green cones.
https://www.akc.org/expert-advice/health/can-dogs-see-color/