I have a terminal program using ncurses that periodically changes the foreground and background colors. Unfortunately, the cursor color won't change until the terminal scrolls. What is ncurses doing during a scroll that causes xterm and other ANSI-compliant terminal emulators to change the cursor color?
I have this in my .Xresources:
xterm*cursorColor: *XtDefaultForeground
I found this: How do I change the cursor color in ncurses forms? showing me the escape sequence to change the cursor color, but it doesn't take into account the fact that the cursor is actually brighter because it's in bold. I can multiply the values I get from color_content() with 1.48, but this strikes me as inviting trouble later on.
For some reason I can't figure out, just dividing the bold color by the non-bold color (values obtained with a color picker) didn't work. The resulting color was brighter, but didn't match the target value, so I found 1.48 by trial and error.
If I'm stuck with using escape sequences, that's okay, but I'd like to know of a cleaner way to properly bold a color.