How to use standard Drupal 7 farbtastic component? jQuery error So, this is my code:

  drupal_add_library('system', 'farbtastic');


I've added it to a page callback function (also tried putting in an implementation of hook_page_alter()). It doesn't seem to initialize properly, it fails on the first line of the system library farbtastic,


  Uncaught TypeError: Cannot read property 'farbtastic' of undefined


Has anyone had this issue before? Any ideas? I get the sense I'm doing something wrong because farbtastic is part of Drupal core now...
The Drupal core's farbtastic works differently. You will have to attach it to a an element eg: a form widget. 
Eg: 

colour_mod.module

$form['colour1'] = array(
    '#type' =&gt; 'fieldset',
    '#title' =&gt; t('Enter Colour:'),
    '#tree' =&gt; TRUE,
    '#description' =&gt; '&lt;div id="color_picker"&gt;&lt;/div&gt;',
    '#attached' =&gt; array(
        'library' =&gt; array(
            array('system', 'farbtastic'),
        ),
        'js' =&gt; array(drupal_get_path('module', 'colour_mod') . '/colour_mod.js'),
    ),

);


colour_mod.js:

(function ($) {
  Drupal.behaviors.colour1 = {
    attach: function(context) {
                var farb = $.farbtastic("#color_picker");   
   }
  }
})(jQuery);