[LyX/master] Prevent branch background color from leaking out of the document
lasgouttes at lyx.org
Fri Jan 22 10:02:25 UTC 2021
Le 21/01/2021 à 14:02, Jürgen Spitzmüller a écrit :
> My point is saving in the document. We need
> \color background
> in the LyX header in order to dynamically assign the correct color (and
> yes we do that via getFromLyXName).
> We cannot save the color code, as we need to save it as string (to
> catch both hexnames and semantic names)
What I had in mind is that we save the name when there is one, and the
hexcode when there is no name.
* code: Color_background, name: "background", rgb: "linen"
=> saved: "background"
* code: Color_mathbg, name: "mathbg", rgb: "@background"
=> saved: "mathbg"
[Bonus: this @background notation does not exist yet, but it would help
us a lot to have such reference to colors]
* code: <dynamic>, name: "", rgb "#00aaff"
=> saved: "#00aaff"
[this what I would like.]
In this last case, the color definition (#rgb, linen, @othercolor,
whatever) would be saved at the place in the LyX file where the relevant
color is needed, but no name would need to be saved, obviously.
My take is that the name is only needed for the colors of GUI elements
that can be set in the color preferences.
It seems to me that there are things that one of us (or both) does not
understand in the other's line of thought.
More information about the lyx-devel