Skip to content

Highlight verses using tag folder color. Solves #968#1336

Open
LAfricain wants to merge 1 commit into
crosswire:masterfrom
LAfricain:verse-highlight
Open

Highlight verses using tag folder color. Solves #968#1336
LAfricain wants to merge 1 commit into
crosswire:masterfrom
LAfricain:verse-highlight

Conversation

@LAfricain

Copy link
Copy Markdown
Contributor

feat: highlight verses using tag folder color

This PR adds visual highlighting of Bible verses based on their bookmark tag color.

New behavior

When a verse is bookmarked inside a colored tag folder, it is highlighted in the Bible text using that folder's color. The text color is automatically adjusted (white or black) based on the background luminance to ensure readability.

  • The current verse green highlight is disabled when a tag color is present, avoiding visual conflicts.
  • Verse ranges, comma-separated verses and semicolon-separated references are all supported.

Opting out

This feature is entirely driven by the tag color. If you do not want a tag folder to highlight its verses in the Bible text, simply remove its color (click "No color" when editing the folder). Folders without a color will not highlight any verses.

Details

  • Highlighting is handled in display.cc via get_tag_color_for_versekey()
  • Text color contrast is computed using the ITU-R BT.709 relative luminance formula
  • Depends on the bookmark color feature introduced in PR Bookmark color solves #685 #1317

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant