code: private void setHex() {
  
          String hRed = Integer.toHexString(getRed());
          String hGreen = Integer.toHexString(getGreen());
          String hBlue = Integer.toHexString(getBlue());
  
          if (hRed.length() == 0) {
              hRed = "00";
          }
          if (hRed.length() == 1) {
              hRed = "0" + hRed;
          }
          if (hGreen.length() == 0) {
              hGreen = "00";
          }
          if (hGreen.length() == 1) {
              hGreen = "0" + hGreen;
          }
          if (hBlue.length() == 0) {
              hBlue = "00";
          }
          if (hBlue.length() == 1) {
              hBlue = "0" + hBlue;
          }
  
          m_hex = hRed + hGreen + hBlue;
      }
docs: Converts from RGB to Hexadecimal notation.