Rules of Red-black trees

Red-black tree rule 1:

Every node is either red or black.

Red-black tree rule 2:

If a node is one color, its child is the opposite color.

Red-black tree rule 3:

Every path from a given node to leaf nodes contains the same number of black nodes.

See this YouTube video for more information about Red-black tree insertions. We are looking at one specific case in this webpage.

https://youtu.be/5IBxA-bZZH8?si=CJ8c1pDFZQ3Nl79P&t=115

Here is an image of a Red-black tree color violation with a red uncle.

Color Violation with Red Uncle

Handling a color violation with a red uncle