original_docstring: 
          Update the grid on-screen based on the Grid object.
          
docstring: Update the grid on-screen based on the Grid object.
docstring_tokens: Update the grid on - screen based on the Grid object .
code: def update(self):
          """
          Update the grid on-screen based on the Grid object.
          """
          for s in range(grid.SEG_COUNT):
              circle_array = self.circles[s]
              color_array = self.grid.get_seg(s).get_pixels()
              for l in range(len(color_array)):
                  color = color_array[l]
                  r, g, b = color[0], color[1], color[2]
                  # TODO: Find source of colors being out of range
                  if r < 0 or g < 0 or b < 0 or r > 255 or g > 255 or b > 255:
                      print("Error: Color", r, g, b, "out of range.")
                  else:
                      hex_color = f'#{r:02x}{g:02x}{b:02x}'
                      self.canvas.itemconfig(circle_array[l], fill=hex_color)
  
  
          self.root.update()
code_tokens: def update ( self ) : for s in range ( grid . SEG_COUNT ) : circle_array = self . circles [ s ] color_array = self . grid . get_seg ( s ) . get_pixels ( ) for l in range ( len ( color_array ) ) : color = color_array [ l ] r , g , b = color [ 0 ] , color [ 1 ] , color [ 2 ] if r < 0 or g < 0 or b < 0 or r > 255 or g > 255 or b > 255 : print ( "Error: Color" , r , g , b , "out of range." ) else : hex_color = f'#{r:02x}{g:02x}{b:02x}' self . canvas . itemconfig ( circle_array [ l ] , fill = hex_color ) self . root . update ( )
short_docstring: Update the grid on-screen based on the Grid object.
short_docstring_tokens: Update the grid on - screen based on the Grid object .
comment: """
          Update the grid on-screen based on the Grid object.
          """$SEP$# TODO: Find source of colors being out of range