// Swap blue/red channel? Why do I need to do this?
@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);
					}
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
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() {
// 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);
}