Hi @lgi, yes I just did have a look. The problem is real: TGeoVolume
stores the line properties (width, style and color) as TAttLine
. So it is just the TColor
index that gets stored, and then made persistent. So when reading back the volume in a separate root session, since the color with that index does not exist, you will get some gibberish color in the display. Of course if you recreated the same color with the same index you would get the right thing.
So AFAICT this points to a deeper problem, that TAttLine
derived objects having a user-defined color cannot be made persistent. For you, the easy solution is to use one of the pre-defined base colors, but it would be useful to open a bug report, since the problem cannot be just addressed in geometry.