cursorInk function

Color cursorInk(
  1. int cursorColor,
  2. int inverseFg
)

Cursor ink color: the program-set OSC 12 color when present, else an inverse-video cursor using the cell's effective fg. cursorColor is the raw snapshot value (0x00RRGGBB) or kCursorColorUnset.

Implementation

Color cursorInk(int cursorColor, int inverseFg) {
  if (cursorColor == kCursorColorUnset) {
    return Color(0xFF000000 | inverseFg);
  }
  return Color(0xFF000000 | (cursorColor & 0xFFFFFF));
}