Math with Colors

I believe this is the end result of the color test. It turned out pretty well. Thank you everyone.

int maxColor = 255;
float hue = maxColor;
float sat = maxColor;
float bright = maxColor;
int scale = 4;
int widthWin = 1280;
int heightWin = 800;
int penColor = 0;
int grad = 1;

void setup() {
  //size(width, height);
  surface.setSize(widthWin, heightWin);
  colorMode(HSB);
  background(192, 64, 0);
}

void draw() {
  stroke(penColor, sat, maxColor);
  line(width/2, height/2, mouseX, mouseY);
  println ("Color: " + (mouseX/float(widthWin))*maxColor + " , " + sat, " , " + (mouseY/float(heightWin))*maxColor);
  penColor += grad;
  if (penColor > 255) {
    penColor = 255;
    grad = -1;
  } else if (penColor < 0) {
    penColor = 0;
    grad = 1;
  }
}

void mousePressed() {
  if (mouseButton == CENTER) {
  background(192, 64, 0);
  }
}

void mouseDragged() {
  if (mouseButton == LEFT) {
    sat--;
    if (sat < 0) sat = 0;
  } else if (mouseButton == RIGHT) {
    sat++;
    if (sat > 255) sat = 255;
  }
}