Drive color via custom property
With current blender versions, you can create multi-dimensional custom property fields.
These will look this:
You create them by setting the value on your custom property to this format:
[0.2, 0.4, 0.3]


Be sure to set your color value to the correct type, the default is &quot;linear&quot;, for RGB values &quot;gamma-corrected&quot; is usually what you would want.
You can then draw this property anywhere in the blender UI, if you wish. This is a short breakdown on the naming conventions

If you want to use this to drive a material color on an object, so the color picker actually influences the color of a part of a model, you should set up a RGB-node in the Shader-Node-Tree (the Shader Editor).
Open the input field for the color and then add a driver to each color channel.

To access the channels as driver input variables, use the following pattern:
[&quot;NameOfCustomProperty&quot;][NumberOfChannel]

or in an example
[&quot;color_ball&quot;][0]

this would give the red channel.
[&quot;color_ball&quot;][1]

this would give the green channel.
[&quot;color_ball&quot;][2]

this would give the blue channel.