Am Donnerstag, dem 21.01.2021 um 10:41 +0100 schrieb Jean-Marc Lasgouttes: > Le 21/01/2021 à 09:55, Jürgen Spitzmüller a écrit : > > Am Donnerstag, dem 21.01.2021 um 09:52 +0100 schrieb Jean-Marc > > Lasgouttes: > > > This is why IMO declaring a name for such colors is a mistake. An > > > enum value generated on the fly would be enough. > > > > And where would you store and access these enum values? > > The color cache (is that ColorTable?) would give me one (that would > be > an extension of Color_Code) on request (code = > colorCache.allocateColor("58bbF7")). The int value would be the id of > the color in memory. When writing to file, one would get the rgb > value > and write that to file.
How would that work with semantic branch names (e.g. \color background)? Semantic branch names are essential to support branches properly in different color themes. Also, how would you export semantic color names in LaTeX (e.g. \textcolor{notefontcolor})? Exporting static rgb values strikes me like a huge step backwards. > Doesn't it feel a bit complicated? No. After all, we only handle that internally. > > I agree though that with a loooooong running LyX instance (as some of > our users have), the handling of allocation (and deallocation) of > color > may get more complicated. I have not thought a lot abpit it, but I > suspect that there exists a data structure for that. Coupling the color table to buffer seems the more sensible approach to me. > > JMarc >
signature.asc
Description: This is a digitally signed message part
-- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel