Page 1 of 1

Caret color in theme file

Posted: 12.01.2024 16:04
by joz9
Anybody knows why I am not getting the specified color of the caret by this line?

Code: Select all

"EdCaret" : "#ffb600",
Instead the caret color is some kind of blue.

I'll attach both files I'm working on. If somebody is willing to have a look please.

Re: Caret color in theme file

Posted: 12.01.2024 18:35
by main Alexey
Caret color is not setting directly, sorry. real color of caret is got from combination: EdCaret color and text-background-color.

Re: Caret color in theme file

Posted: 13.01.2024 07:33
by main Alexey
New theme files: 'fixed margin' color is too light. scrollbar scrollers backgnd is light too.
Also maybe see in the Wiki if needed:
https://wiki.freepascal.org/CudaText
50.4 Meaning of UI-theme elements
50.5 Meaning of syntax-theme elements

Re: Caret color in theme file

Posted: 13.01.2024 11:17
by joz9
Yes, because I didn't know what ID is for what UI element, so I just made it so bright, to see what happens when I apply it. Then later I fix them one by one. Haven't finished everything yet. And some UI elements I'm not even using obviously, hence I can't see what's going on because nothing happens when I apply the theme.
I can fix some of those along the way.

But regarding the Caret color, if the background is a dark blue or something like that, does that mean I can't have the caret in bright orange lets say? If it is possible, how? I don't understand how is the caret color a mixture of the caret color and the background color? I understand how to get different colors by mixing the primary colors and so on, but that's probably not what's happening here in CudaText.

Re: Caret color in theme file

Posted: 13.01.2024 13:12
by main Alexey
> I don't understand how is the caret color a mixture of the caret color and the background color?

no, real-caret-color is a mixture: theme-caret-color XOR (boolean operator) text-back-color.
so we have
ORANGE = theme_color XOR DARKGRAY
from which maybe we can find theme_color.