@Override
					public void run() {
						// Bounds
						if ( colorPick.getX()+hs > colorPane.getX()+colorPane.getWidth()-1 )
							colorPick.setAbsolutePosition(colorPane.getX()+colorPane.getWidth()-hs-1, colorPick.getY());
						if ( colorPick.getX()+hs < colorPane.getX() )
							colorPick.setAbsolutePosition(colorPane.getX()-hs, colorPick.getY());
						if ( colorPick.getY()+hs > colorPane.getY()+colorPane.getHeight() )
							colorPick.setAbsolutePosition(colorPick.getX(), colorPane.getY()+colorPane.getHeight()-hs);
						if ( colorPick.getY()+hs < colorPane.getY()+1 )
							colorPick.setAbsolutePosition(colorPick.getX(), colorPane.getY()-hs+1);
						Vector2i offset = new Vector2i( (int)(colorPick.getX()+hs-colorPane.getX()), (int)colorPane.getHeight()-(int)(colorPick.getY()+hs-colorPane.getY()) );
						int index = (offset.y*(int)colorPane.getWidth())+offset.x;
						int rgb = colorPane.colors[index];
						// Swap blue/red channel? Why do I need to do this?
						Color c = new Color((rgb >> 0) & 0xFF, (rgb >> 8) & 0xFF, (rgb >> 16) & 0xFF, 255);
						// Update the temp color
						colorS.setBackgroundLegacy(c);
						r.setText(""+c.getRed());
						g.setText(""+c.getGreen());
						b.setText(""+c.getBlue());
						colorPick.setBackgroundLegacy(c);
						tempColor(c);
					}
@Override
					public void run() {
					
						if ( colorPick.getX()+hs > colorPane.getX()+colorPane.getWidth()-1 )
							colorPick.setAbsolutePosition(colorPane.getX()+colorPane.getWidth()-hs-1, colorPick.getY());
						if ( colorPick.getX()+hs < colorPane.getX() )
							colorPick.setAbsolutePosition(colorPane.getX()-hs, colorPick.getY());
						if ( colorPick.getY()+hs > colorPane.getY()+colorPane.getHeight() )
							colorPick.setAbsolutePosition(colorPick.getX(), colorPane.getY()+colorPane.getHeight()-hs);
						if ( colorPick.getY()+hs < colorPane.getY()+1 )
							colorPick.setAbsolutePosition(colorPick.getX(), colorPane.getY()-hs+1);
						Vector2i offset = new Vector2i( (int)(colorPick.getX()+hs-colorPane.getX()), (int)colorPane.getHeight()-(int)(colorPick.getY()+hs-colorPane.getY()) );
						int index = (offset.y*(int)colorPane.getWidth())+offset.x;
						int rgb = colorPane.colors[index];
					
						Color c = new Color((rgb >> 0) & 0xFF, (rgb >> 8) & 0xFF, (rgb >> 16) & 0xFF, 255);
					
						colorS.setBackgroundLegacy(c);
						r.setText(""+c.getRed());
						g.setText(""+c.getGreen());
						b.setText(""+c.getBlue());
						colorPick.setBackgroundLegacy(c);
						tempColor(c);
					}
@override public void run() { if ( colorpick.getx()+hs > colorpane.getx()+colorpane.getwidth()-1 ) colorpick.setabsoluteposition(colorpane.getx()+colorpane.getwidth()-hs-1, colorpick.gety()); if ( colorpick.getx()+hs < colorpane.getx() ) colorpick.setabsoluteposition(colorpane.getx()-hs, colorpick.gety()); if ( colorpick.gety()+hs > colorpane.gety()+colorpane.getheight() ) colorpick.setabsoluteposition(colorpick.getx(), colorpane.gety()+colorpane.getheight()-hs); if ( colorpick.gety()+hs < colorpane.gety()+1 ) colorpick.setabsoluteposition(colorpick.getx(), colorpane.gety()-hs+1); vector2i offset = new vector2i( (int)(colorpick.getx()+hs-colorpane.getx()), (int)colorpane.getheight()-(int)(colorpick.gety()+hs-colorpane.gety()) ); int index = (offset.y*(int)colorpane.getwidth())+offset.x; int rgb = colorpane.colors[index]; color c = new color((rgb >> 0) & 0xff, (rgb >> 8) & 0xff, (rgb >> 16) & 0xff, 255); colors.setbackgroundlegacy(c); r.settext(""+c.getred()); g.settext(""+c.getgreen()); b.settext(""+c.getblue()); colorpick.setbackgroundlegacy(c); tempcolor(c); }