You no longer need to use the structs to use these functions.
The clamping and NaN checks are done in the new functions, to keep the rest of the code closer to the original.
The actual calling of these functions is still done in math_color.c, which is definitely the wrong place; one step at a time.
This is roughly the same I did for Godot, but built into the ok_color functions themselves.
Having these functions return only valid numbers makes life a lot easier.
I don't know how this got here but it's bothering me.
It doesn't really matter as this isn't the right place to do this anyway but it doesn't hurt to fix either.
The foundation is there, with a proper external module and build option.
Björn Ottosson's original code is a CPP header; I ported it to C with a header that only exposes the desired functions. I might add a diff for this later to keep track of changes.
The actual integration of these functions into Blender's color math is hacky and doesn't work properly, which is what I intend to work on next.