text: # generated by mBlock5 for codey & rocky
  # codes make you happy
  
  import rocky, codey, event
  
  @event.start
  def on_start():
      while True:
          time.sleep(1)
          if rocky.color_ir_sensor.is_color('red'):
              codey.display.show('rood', wait = False)
              codey.led.show(255, 0, 0)
  
          if rocky.color_ir_sensor.is_color('green'):
              codey.display.show('groen', wait = False)
              codey.led.show(37, 161, 0)
  
          if rocky.color_ir_sensor.is_color('blue'):
              codey.display.show('blauw', wait = False)
              codey.led.show(0, 148, 255)
  
          if rocky.color_ir_sensor.is_color('yellow'):
              codey.display.show('geel', wait = False)
              codey.led.show(255, 246, 0)
  
          if rocky.color_ir_sensor.is_color('purple'):
              codey.display.show('paars', wait = False)
              codey.led.show(171, 16, 171)
  
  