When a color is defined in palette A and B with the same name (e.g. Red1) but different hex values (#FF0000 vs. #BF2310) and palette A removed later from the system, this color is falsely applied from B to existing documents. The better solution is to store the hex value and either look for proper names, or to store both information. Unfortunately ODF references color by the name, e.g. <ref name="color"/>. So the question is if it's feasible.
(In reply to Heiko Tietze from comment #0) > Unfortunately ODF references color by the name, e.g. <ref name="color"/>. So > the question is if it's feasible. I think, that you are wrong here. The part <ref name="color"/> in the schema is a reference to the part <define name="color"> in the schema. That is line#18014-18018 <define name="color"> <data type="string"> <param name="pattern">#[0-9a-fA-F]{6}</param> </data> </define> You read the same in section 18.3.9 in part 1 of the spec. In no place in the document the name of a color is stored. And only the path to the last used palette is stored in settings.xml. Another consumer need not read settings.xml at all.
(In reply to Regina Henschel from comment #1) > I think, that you are wrong here. Double-checked the issue by creating a new User color "Blue" that is rather green, deleted this color, and reloaded the document. It is stored as hex value <style:paragraph-properties fo:background-color="#729f00"... So this issue is indeed NOTABUG, at least for Writer. I'm setting the issue as NEEDINFO and ask the commenter on https://design.blog.documentfoundation.org/2016/12/30/new-color-palettes-in-libreoffice/#comments to submit an example.
I think you read his comment incorrectly. He said that if he used to use Green 1 in the past palette and used Green 1 in the new palette they would be different colors, well of course. He said he couldnt reuse the old color, but he can will the document colors palette.