I have a DNA model that I created and imported from a 3D chemistry modeling program (Avogadro). I exported the model in .wrl format (the only 3D format allowed for export by Avogadro) and imported into Blender. Unfortunately, there's a bug in Blender 2.8x that does not allow color to be imported in .wrl format.
So, I need a workaround. I need to color each molecule a different color based on its object dimensions. For example, the phosphorous molecule is a particular size as are carbon, oxygen, nitrogen, and hydrogen. I've spent a few hours now scanning the various forums for an answer. I have yet to find a solution.
Ideally, I'd also like to color the little stick bonds between each atom based on the colors of the two atoms it is binding together. That's not a deal-breaker, though. I can get away with making the stick bonds a single color.
See the attached images for the shader setup I have right now and the result it's producing.