SHOW:
|
|
- or go back to the newest paste.
1 | import java.awt.*; | |
2 | ||
3 | public class ColorWheel { | |
4 | ||
5 | public static void main (String[] args) { | |
6 | //create graphical window with dimensions 512 (w) x 512 (h) | |
7 | DrawingPanel ColorWheel = new DrawingPanel(512, 512); | |
8 | Graphics circle = ColorWheel.getGraphics(); | |
9 | circle.drawOval (0, 0, 512, 512); | |
10 | for (int i = 1; i <= 360; i++) { | |
11 | - | Color c = Color.getHSBColor(i, 1.0f, 1.0f); |
11 | + | Color c = Color.getHSBColor(i, 0.0f, 0.5f); |
12 | - | circle.fillArc(0, 0, 512, 512, i, i + 1); |
12 | + | circle.fillArc(0, 0, 512, 512, i - 1, 1); |
13 | } | |
14 | } | |
15 | } |