code: private static int[] hslToRgb(float h, float s, float l) {
          
          int[] ret = new int[3];
          
          float m2 = (l <= 0.5f) ? l * (s + 1) : l + s - l * s; 
          float m1 = l * 2 - m2;
          ret[0] = Math.round(hueToRgb(m1, m2, h + 1.0f/3.0f) * MAX_VALUE);
          ret[1] = Math.round(hueToRgb(m1, m2, h) * MAX_VALUE);
          ret[2] = Math.round(hueToRgb(m1, m2, h - 1.0f/3.0f) * MAX_VALUE);
          return ret;
      }
docs: Converts the HSL color model to RGB
  @param h hue normalized to 0..1
  @param s saturation normalized to 0..1
  @param l level normalized to 0..1
  @return an array of three values R, G and B in the interval 0..255