Farbtastic color picker to change the background color of text field input?
Something like this?

/**
 * Show farbtastic colorpicker widget.
 */
(function ($) {
  Drupal.behaviors.my_color_picker = {
    attach: function(context) {

      $(".edit-my-color-picker", context).on("focus", function(event) {
        var edit_field = $(this);
        var picker = edit_field.closest('div').parent().find(".my-color-picker");

        // Hide all color pickers except this one.
        $(".my-color-picker").hide();
        $(picker).show();
        $.farbtastic(picker, function(color) {
          edit_field.val(color);
          // background color, may need to add # to color.
          $(edit_field).css("background-color", color);
        }).setColor(edit_field.value);
      });

    }
  }
})(jQuery);


Notice I added 'context' to the original selector and changed 'live' to 'on'. Live function is deprecated as of jquery 1.7.
I also changed it so the edit_field variable stores the jquery object.

Drupal does already have a couple of color fields, on of which is HERE