Caret color in theme file

Post Reply
joz9
Posts: 13
Joined: 25.01.2023 21:15
Contact:

Caret color in theme file

Post 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.
Attachments
THEME_files.7z
(1.77 KiB) Downloaded 59 times
Električar Sombor 063 1994890

https://rst.bearblog.dev/
main Alexey
Posts: 2245
Joined: 25.08.2021 18:15

Re: Caret color in theme file

Post by main Alexey »

Caret color is not setting directly, sorry. real color of caret is got from combination: EdCaret color and text-background-color.
main Alexey
Posts: 2245
Joined: 25.08.2021 18:15

Re: Caret color in theme file

Post 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
joz9
Posts: 13
Joined: 25.01.2023 21:15
Contact:

Re: Caret color in theme file

Post 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.
Električar Sombor 063 1994890

https://rst.bearblog.dev/
main Alexey
Posts: 2245
Joined: 25.08.2021 18:15

Re: Caret color in theme file

Post 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.
Post Reply