<commit_before>SECTIONS =
  '#code': 'Background'
  '.c':  'Comment'
  '.cl': 'Cursor line'
  '.co': 'Constant'
  '.cu': 'Cursor'
  '.id': 'Identifier'
  '.ln': 'Line number'
  '.pp': 'PreProc'
  '.ra': 'rubyArrayDelimiter'
  '.rb': 'rubyBlock'
  '.rd': 'rubyDefine'
  '.rm': 'rubyMethodBlock'
  '.sp': 'Special'
  '.st': 'Statement'
  '.t':  'Type'

jQuery ->

  for klass, section of SECTIONS
    do (klass, section) ->
      $(klass).click (event) ->
        event.stopPropagation()
        $('#section_name').text(section)

  Raphael ->

    cp = $('#colorpicker')
    offset = cp.offset()

    Raphael.colorwheel(offset.left, offset.top, 320, '#ccc', cp.get(0))

<commit_msg>Colorwheel now updates selected class color<commit_after>SECTIONS =
  '#code': 'Background'
  '.c':  'Comment'
  '.cl': 'Cursor line'
  '.co': 'Constant'
  '.cu': 'Cursor'
  '.id': 'Identifier'
  '.ln': 'Line number'
  '.pp': 'PreProc'
  '.ra': 'rubyArrayDelimiter'
  '.rb': 'rubyBlock'
  '.rd': 'rubyDefine'
  '.rm': 'rubyMethodBlock'
  '.sp': 'Special'
  '.st': 'Statement'
  '.t':  'Type'

selectedClass = null

jQuery ->

  for klass, section of SECTIONS
    do (klass, section) ->
      $(klass).click (event) ->
        event.stopPropagation()
        selectedClass = klass
        $('#section_name').text(section)

  Raphael ->

    cp = $('#colorpicker')
    offset = cp.offset()

    cw = Raphael.colorwheel(offset.left, offset.top, 320, '#ccc', cp.get(0))

    onchange = ->
      (clr) ->
        clr = Raphael.color(clr)
        $(selectedClass).css('color', clr)
        $('#section_name').css('color', clr)

    cw.onchange = onchange()

{'fraction_non_alphanumeric': 0.20784794604537093, 'fraction_numerical': 0.004904966278356836, 'mean_word_length': 2.8764845605700713, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '118149', 'n_tokens_mistral': 610, 'n_tokens_neox': 591, 'n_words': 132}