public Color[] getColors() { int xSize = m.xSize; int ySize = m.ySize; Color[] pixels = new Color[xSize * ySize]; float c; for (int y = 0; y < ySize; y++) { for (int x = 0; x < xSize; x++) { if (lm.grid[x, y] == 1) { pixels[y * xSize + x] = Color.black; } else { c = MyMath.remap(m.grid[x, y].speed, 0, 60, 0, 1); pixels[y * xSize + x] = scale.getColor(c); } } } return(pixels); }