Convert Colors from Linear RGB to 8bit RGB (?)

I’m trying to find an easy way to convert PBR color tables to 8bit RGB values, and I did it, junt don’t think thats the correct or most efficient way to do it. I don’t even know if linear or 8bit RGB are the right names for those. Simply put, I just want to make a G2 definition that convert the material tables that go from 0.00 to 1.00 to go from 0 to 255.
Any tips?

Linear RGB to 8bit RGB.ghz (177.4 KB)

Material tables:
https://help.autodesk.com/view/ARNOL/ENU/?guid=arnold_user_guide_ac_standard_surface_ac_standard_base_html#metalness

And for those who need it, Rhino already does that, I’m just trying to make it all at once

But it would be awesome if we could type the colour names like in G2 and have a option to see a expanded color list like this one:
https://encycolorpedia.com/named