//----------------------------------------Creates an HSB Spectrum Image----------------------------------------- // Ramp Dimensions w = 170; h = 16; //Creates an HSB image... THIS IS THE ONLY WAY TO DO IT!! newImage("Calibration Bar", "RGB black", w, h, 1); run("HSB Stack"); //Creates the Hue ramp image newImage("Hue", "8-bit", w, h, 1); for (x=0; x<=w; x++) { for (y=0; y<=h; y++) { setPixel(x, y, (w-x)); } } //Copies the Hue ramp into the Hue channel of the HSB Stack selectWindow("Hue"); run("Select All"); run("Copy"); run("Close"); selectWindow("Calibration Bar"); setSlice(1); run("Paste"); //Creates the Saturation (constant) image newImage("Sat", "8-bit white", w, h, 1); //Copies the Sat image into the Sat channel of the HSB Stack selectWindow("Sat"); run("Select All"); run("Copy"); run("Close"); selectWindow("Calibration Bar"); setSlice(2); run("Paste"); //Creates the Brightness ramp image newImage("Bri", "8-bit", w, h, 1); for (x=0; x<=w; x++) { for (y=0; y<=h; y++) { setPixel(x, y, (255/h)*(h-y)); } } //Copies the Bri image into the Bri channel of the HSB Stack selectWindow("Bri"); run("Select All"); run("Copy"); run("Close"); selectWindow("Calibration Bar"); setSlice(3); run("Paste"); //Turns the HSB values into an RGB image run("RGB Color"); run("Select None");