'Is it possible to print rgb colours in C

I want to print out the block character(█) as any rgb colour(#000000-#ffffff). I'm aware of the ANSI colours and the ANSI 8-bit however the colours are to limited for my use. How can I best achieve full RBG color range on terminal?

This will only be used for UNIX/UNIX like OS, there will be no windows use.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source