 
   constructor: ->
     @build()
-    @brush = 1 # @brush remembers whether to paint with foreground or background pixels
+    # When the page first loads, the color on the brush should be evident
+    @choose_brush 1 # @brush remembers whether to paint with foreground or background pixels
 
   build: ->
     # The number of rows and columns change with the mode:

      switch input.name
        when 'asset' then asset_mode = input.value
        when 'colors' then color_mode = input.value
    # Background colors #1 and #2 should only be shown in multi-color mode
    switch color_mode
      when 'hi-res' then $('.multi-color').fadeOut 'fast'
      when 'multi-color' then $('.multi-color').fadeIn 'fast'
    mode = MODE[ asset_mode][ color_mode]

    fill_out_data()

        $(tr).append  td
      table.append  tr
    table.find('td').mousedown(@when_button_pressed).mouseup @when_button_released
    # Background colors #1 and #2 should only be shown in multi-color mode
    switch mode.color_mode
      when 'hi-res' then $('.multi-color').fadeOut 'fast'
      when 'multi-color' then $('.multi-color').fadeIn 'fast'
    # Assign pixel values to each color source
    $('#color_sources >div').each ( i, div ) ->
      $(div).data 'pixel_value', if mode.color_mode is 'multi-color' or i < 3 then i else 1
    @render()

  choose_brush: ( pixel_value ) ->
    @brush = pixel_value
    # The chosen color source should indicate that it is selected
    $('#color_sources >div').each ( i, div ) ->
      div = $ div
      if div.data('pixel_value') is pixel_value
        div.addClass 'on_brush'
      else
        div.removeClass 'on_brush'

  coordinates_from: ( event) ->
    td = $(event.currentTarget)
