Indeed.
But the complementary and trid colors are the only 2 algorithms, to obtain colors by simple manipulations of R, G and B. Afterwards, the algorithms become more complicated (need to use the chromatic circle and to use [radians] angles, shadow degrees i.e. gray percentage, highlighting...).
I saw that there was an impressive library of objects \ methods to manage these concepts, once they were understood (which is not yet my case):
https://wiki.lazarus.freepascal.org/mbColorLib .
In fact I use the complementary color sparingly (contrast is what tires the eyes the most): it's just to "massively" affect the color of the fonts in opposition to the color of the Canvas of their parent component, with recursive RTTI (I happily tested my Delphi RTTI routines: they work very well with Lazarus).