@Override
  public RgbColor getRgb() {
    double red = 0;
    double green = 0;
    double blue = 0;

    double h = ChromaUtil.clamp(hue, 0, 360);
    double s = ChromaUtil.clamp(saturationV, 0, 1);
    double v = ChromaUtil.clamp(value, 0, 1);
    double c = s * v;
    double sector = h / 60; // Sector of the color wheel.
    double x = c * (1 - Math.abs((sector % 2) - 1));

    if (sector < 1) {
      red = c;
      green = x;
    } else if (sector < 2) {
      red = x;
      green = c;
    } else if (sector < 3) {
      green = c;
      blue = x;
    } else if (sector < 4) {
      green = x;
      blue = c;
    } else if (sector < 5) {
      red = x;
      blue = c;
    } else if (sector <= 6) {
      red = c;
      blue = x;
    }

    double min = v - c;

    red += min;
    green += min;
    blue += min;

    red *= 255;
    green *= 255;
    blue *= 255;

    return new RgbColor(red, green, blue, alpha);
  }