I am not exactly sure on the specific change over of the color of the engine but I did own a 1987 that had an all black engine and I have seen online that 1988 and on are usually silver.
There are other changes in the KX500 design during those years you are considering buying. You may want to do some further research before purchasing. A main difference is the 1988 and older KX500 has one type of engine design and the 1989-04 is a different engine design. Some parts can interchange but not all. If you get an 1988 or older engine make sure the cylinder and KIPS are good as they are no longer available new and are getting harder to find in decent shape used. There are frame, suspension, bodywork and other changes occurring during these years as well. Most of these changes restrict swapping parts from newer models which means less parts availability.
Finding parts for the 1988 and older KX500s is getting tough whether it is for the engine, body, frame, ect. If you are gonna go with an 1988 or older model then definitely looking for a good solid bike to start with is a good idea. Unless for some reason you really need an older KX500 your best bet may be to look for a 97-04 model as they had the most technology from the factory, can swap parts from any KX500 89-04 and have the most parts availability new or used today.