Could I see a simple example of using a color picker in a script?
Just declare a FloatVectorProperty, set its subtype to 'COLOR' and add it to a panel or whatever.
my_color = bpy.props.FloatVectorProperty(
             name = &quot;Color Picker&quot;,
             subtype = &quot;COLOR&quot;,
             default = (1.0,1.0,1.0,1.0)
             size = 4
             )

In order to access the values of the property, you would have to create an Operator. Minimal working example, adds a new panel to the render settings, allows to pick a color as well as printing the values to the console. Further reading: How to create a custom UI?

import bpy

class SimpleOperator(bpy.types.Operator):
    &quot;&quot;&quot;Tooltip&quot;&quot;&quot;
    bl_idname = &quot;object.simple_operator&quot;
    bl_label = &quot;Simple Object Operator&quot;

    def execute(self, context):
        clr = context.scene.mytool_color
        print (clr[0], clr[1], clr[2], clr[3])
        return {'FINISHED'}


class HelloWorldPanel(bpy.types.Panel):
    &quot;&quot;&quot;Creates a Panel in the Object properties window&quot;&quot;&quot;
    bl_label = &quot;Hello World Panel&quot;
    bl_idname = &quot;OBJECT_PT_hello&quot;
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = &quot;render&quot;

    def draw(self, context):
        layout = self.layout

        row = layout.row()
        row.prop(context.scene, &quot;mytool_color&quot;)
        row = layout.row()
        row.operator(SimpleOperator.bl_idname)
        
def register():
    bpy.utils.register_class(HelloWorldPanel)
    bpy.utils.register_class(SimpleOperator)
    
    # Register the property per Scene, Object or whatever
    bpy.types.Scene.mytool_color = bpy.props.FloatVectorProperty(
                 name = &quot;Color Picker&quot;,
                 subtype = &quot;COLOR&quot;,
                 size = 4,
                 min = 0.0,
                 max = 1.0,
                 default = (1.0,1.0,1.0,1.0))
    
def unregister():
    bpy.utils.unregister_class(SimpleOperator)
    bpy.utils.unregister_class(HelloWorldPanel)
    
    del bpy.types.Scene.mytool_color


if __name__ == &quot;__main__&quot;:
    register()