How to sync colors with X windows

I am using XAllocNamedColor to get rgb values for the colors I want to use. How can I use these values to get an exact matching color in opengl? I am currently using glClearColor and glColor3d to specify by background and drawing colors.

Thanks in advance to anyone that can help.