Hello!
I'm an extremely experienced software engineer with over 20 years in software development, mostly C, C++, and C#.
I can provide you with fully commented and readable original C source code (or C++ or C# if you prefer) for a working program to convert from RGB to HSV based on your documented requirements, and I'd love to have the chance to continue working for you on any future projects.
I look forward to hearing from you soon!