Yet another color coding script(s)

Quote from Chad Kurszewski on 2025-01-17, 8:52 amI was already working on a new version of Jerry's color coding scripts, by learning recursive CTEs.
What's different about my scripts:
- Unlike Jerry's (I think), my scripts only include blood related people, and do not include ancestors/descendants that are step-, foster-, or adoptive.
- Like Jerry's, these scripts use parents to determine relationships, not relate1/relate2, which have been muddied starting in RM v10 with the "spouse of". FYI, I've filed two bug reports on this: 1) when two related people marry, RM calls one of them "spouse of" instead of what blood relation they are, and 2) advanced search/groups, when doing "ancestors and descendants", it is including spouses in descendants without the option to exclude them. A spouse is not a descendant.
- One script colors ALL blood relatives of the chosen person black (slate). My purpose for this is that I use another database that was given to me with over 200,000 people from the area. I often search his database to see if the person of interest is related to me, so having them colored black makes them stand out.
- The other script colors each of my eight great grandparents a different color. It colors all ancestors of that great grandparent a bright color, and all descendants of that line a lighter, related color. I have corresponding useful descriptions of the color code in the color table. You have to color code your parents and 4 great grandparents manually with the bright ancestor colors, unfortunately. (Fortunately it's only 7 people, including yourself.)
- It was my desire to color code children of parents who were both related to me with the color of the parent that was more closer related to me, but I was not (yet?) able to learn how to do that. Baby steps. Me learning how to do recursive CTEs was hard enough.
Example of color coding my 8 great grandparents and their ancestors:
Here you can see the bright ancestor colors, and lighter descendant colors, and also how one distant cousin (Stroik) married into this related family.
And here's how I labeled the colors, with 'ancestor' of a great grandparent, or that they're 'relation' of them (descendants of that line).
I was already working on a new version of Jerry's color coding scripts, by learning recursive CTEs.
What's different about my scripts:
- Unlike Jerry's (I think), my scripts only include blood related people, and do not include ancestors/descendants that are step-, foster-, or adoptive.
- Like Jerry's, these scripts use parents to determine relationships, not relate1/relate2, which have been muddied starting in RM v10 with the "spouse of". FYI, I've filed two bug reports on this: 1) when two related people marry, RM calls one of them "spouse of" instead of what blood relation they are, and 2) advanced search/groups, when doing "ancestors and descendants", it is including spouses in descendants without the option to exclude them. A spouse is not a descendant.
- One script colors ALL blood relatives of the chosen person black (slate). My purpose for this is that I use another database that was given to me with over 200,000 people from the area. I often search his database to see if the person of interest is related to me, so having them colored black makes them stand out.
- The other script colors each of my eight great grandparents a different color. It colors all ancestors of that great grandparent a bright color, and all descendants of that line a lighter, related color. I have corresponding useful descriptions of the color code in the color table. You have to color code your parents and 4 great grandparents manually with the bright ancestor colors, unfortunately. (Fortunately it's only 7 people, including yourself.)
- It was my desire to color code children of parents who were both related to me with the color of the parent that was more closer related to me, but I was not (yet?) able to learn how to do that. Baby steps. Me learning how to do recursive CTEs was hard enough.
Example of color coding my 8 great grandparents and their ancestors:
Here you can see the bright ancestor colors, and lighter descendant colors, and also how one distant cousin (Stroik) married into this related family.
And here's how I labeled the colors, with 'ancestor' of a great grandparent, or that they're 'relation' of them (descendants of that line).
Uploaded files:

Quote from thejerrybryan on 2025-01-18, 12:18 amCorrect. Mine does not distinguish birth parents, adoptive parents, etc. That was by design, but it would be trivial to make the distinction with a small tweak to my script.
Correct. Mine does not distinguish birth parents, adoptive parents, etc. That was by design, but it would be trivial to make the distinction with a small tweak to my script.

Quote from kevync on 2025-01-19, 9:28 amlooking at those recursive techniques - I believe it could be adapted to find cousin marriages.
looking at those recursive techniques - I believe it could be adapted to find cousin marriages.