src/codeandchords/ModuleMenu.java
private void trichromatic_OneHSB(float[] hsbVals, int inputNum)
	{
		if(hsbVals == null) {
			throw new IllegalArgumentException("Module_01_02.dichromatic_OneHSB: float[] parameter hsbVals is null.");
		} // error checking

		// find the triad:
		float[]	hsbTriad1	= new float[] { (float) ((hsbVals[0] + 0.33) % 1), 1, 1 };
		float[]	hsbTriad2	= new float[] { (float) ((hsbVals[0] + 0.67) % 1), 1, 1 };

		// convert them both to RGB;
		int[]	rgbVals1	= new int[3];
		int[]	rgbVals2	= new int[3];
		int[]	rgbVals3	= new int[3];

		int	rgb1	= Color.HSBtoRGB(hsbVals[0], hsbVals[1], hsbVals[2]);
		Color	rgbColor1	=  new Color(rgb1);

		// Using individual get[Color]() functions b/c getComponents() uses a 0-1 range.
		rgbVals1[0]	= rgbColor1.getRed();
		rgbVals1[1]	= rgbColor1.getGreen();
		rgbVals1[2]	= rgbColor1.getBlue();	

		int	rgb2	= Color.HSBtoRGB(hsbTriad1[0], hsbTriad1[1], hsbTriad1[2]);
		Color	rgbColor2	=  new Color(rgb2);

		// Using individual get[Color]() functions b/c getComponents() uses a 0-1 range.
		rgbVals2[0]	= rgbColor2.getRed();
		rgbVals2[1]	= rgbColor2.getGreen();
		rgbVals2[2]	= rgbColor2.getBlue();	

		int	rgb3	= Color.HSBtoRGB(hsbTriad2[0], hsbTriad2[1], hsbTriad2[2]);
		Color	rgbColor3	=  new Color(rgb3);

		// Using individual get[Color]() functions b/c getComponents() uses a 0-1 range.
		rgbVals3[0]	= rgbColor3.getRed();
		rgbVals3[1]	= rgbColor3.getGreen();
		rgbVals3[2]	= rgbColor3.getBlue();	

		this.trichromatic_ThreeRGB(rgbVals1, rgbVals2, rgbVals3, inputNum);
	}
/**
	 * Uses the given HSB color to find the color across it on the HSB wheel,
	 * converts both colors to RGB, and passes them as parameters to trichromatic_ThreeRGB.
	 *
	 * @param hsbVals	float[] of HSB values defining the color at the tonic of the current scale.
	 */
Uses the given HSB color to find the color across it on the HSB wheel,
converts both colors to RGB, and passes them as parameters to trichromatic_ThreeRGB.

@param hsbVals       float[] of HSB values defining the color at the tonic of the current scale.
Uses the given HSB color to find the color across it on the HSB wheel converts both colors to RGB and passes them as parameters to trichromatic_ThreeRGB . @param hsbVals float [] of HSB values defining the color at the tonic of the current scale .
private void trichromatic_OneHSB(float[] hsbVals, int inputNum)
	{
		if(hsbVals == null) {
			throw new IllegalArgumentException("Module_01_02.dichromatic_OneHSB: float[] parameter hsbVals is null.");
		} 
		float[]	hsbTriad1	= new float[] { (float) ((hsbVals[0] + 0.33) % 1), 1, 1 };
		float[]	hsbTriad2	= new float[] { (float) ((hsbVals[0] + 0.67) % 1), 1, 1 };
		int[]	rgbVals1	= new int[3];
		int[]	rgbVals2	= new int[3];
		int[]	rgbVals3	= new int[3];
		int	rgb1	= Color.HSBtoRGB(hsbVals[0], hsbVals[1], hsbVals[2]);
		Color	rgbColor1	=  new Color(rgb1);
		rgbVals1[0]	= rgbColor1.getRed();
		rgbVals1[1]	= rgbColor1.getGreen();
		rgbVals1[2]	= rgbColor1.getBlue();	
		int	rgb2	= Color.HSBtoRGB(hsbTriad1[0], hsbTriad1[1], hsbTriad1[2]);
		Color	rgbColor2	=  new Color(rgb2);
		rgbVals2[0]	= rgbColor2.getRed();
		rgbVals2[1]	= rgbColor2.getGreen();
		rgbVals2[2]	= rgbColor2.getBlue();	
		int	rgb3	= Color.HSBtoRGB(hsbTriad2[0], hsbTriad2[1], hsbTriad2[2]);
		Color	rgbColor3	=  new Color(rgb3);
		rgbVals3[0]	= rgbColor3.getRed();
		rgbVals3[1]	= rgbColor3.getGreen();
		rgbVals3[2]	= rgbColor3.getBlue();	
		this.trichromatic_ThreeRGB(rgbVals1, rgbVals2, rgbVals3, inputNum);
	}
private void trichromatic_OneHSB ( float [ ] hsbVals , int inputNum ) { if ( hsbVals == null ) { throw new IllegalArgumentException ( "Module_01_02.dichromatic_OneHSB: float[] parameter hsbVals is null." ) ; } float [ ] hsbTriad1 = new float [ ] { ( float ) ( ( hsbVals [ 0 ] + 0.33 ) % 1 ) , 1 , 1 } ; float [ ] hsbTriad2 = new float [ ] { ( float ) ( ( hsbVals [ 0 ] + 0.67 ) % 1 ) , 1 , 1 } ; int [ ] rgbVals1 = new int [ 3 ] ; int [ ] rgbVals2 = new int [ 3 ] ; int [ ] rgbVals3 = new int [ 3 ] ; int rgb1 = Color . HSBtoRGB ( hsbVals [ 0 ] , hsbVals [ 1 ] , hsbVals [ 2 ] ) ; Color rgbColor1 = new Color ( rgb1 ) ; rgbVals1 [ 0 ] = rgbColor1 . getRed ( ) ; rgbVals1 [ 1 ] = rgbColor1 . getGreen ( ) ; rgbVals1 [ 2 ] = rgbColor1 . getBlue ( ) ; int rgb2 = Color . HSBtoRGB ( hsbTriad1 [ 0 ] , hsbTriad1 [ 1 ] , hsbTriad1 [ 2 ] ) ; Color rgbColor2 = new Color ( rgb2 ) ; rgbVals2 [ 0 ] = rgbColor2 . getRed ( ) ; rgbVals2 [ 1 ] = rgbColor2 . getGreen ( ) ; rgbVals2 [ 2 ] = rgbColor2 . getBlue ( ) ; int rgb3 = Color . HSBtoRGB ( hsbTriad2 [ 0 ] , hsbTriad2 [ 1 ] , hsbTriad2 [ 2 ] ) ; Color rgbColor3 = new Color ( rgb3 ) ; rgbVals3 [ 0 ] = rgbColor3 . getRed ( ) ; rgbVals3 [ 1 ] = rgbColor3 . getGreen ( ) ; rgbVals3 [ 2 ] = rgbColor3 . getBlue ( ) ; this . trichromatic_ThreeRGB ( rgbVals1 , rgbVals2 , rgbVals3 , inputNum ) ; }
Uses the given HSB color to find the color across it on the HSB wheel,
 converts both colors to RGB, and passes them as parameters to trichromatic_ThreeRGB.
Uses the given HSB color to find the color across it on the HSB wheel converts both colors to RGB and passes them as parameters to trichromatic_ThreeRGB .
// error checking // find the triad: // convert them both to RGB; // Using individual get[Color]() functions b/c getComponents() uses a 0-1 range. // Using individual get[Color]() functions b/c getComponents() uses a 0-1 range. // Using individual get[Color]() functions b/c getComponents() uses a 0-1 range.