var image = new Bitmap(project.Variables["color"].Value);
int x, y;
for (x = 0; x < image.Width; x++) {
for (y = 0; y < image.Height; y++) {
if (image.GetPixel(x, y).R == 254 && image.GetPixel(x, y).G == 0 && image.GetPixel(x, y).B == 0)
{
project.Variables["x"].Value = x.ToString();
project.Variables["y"].Value = y.ToString();
}
}
}