import java.awt.*; import javax.swing.JApplet; import java.util.HashMap; /* */ public class ColorName extends JApplet { HashMap hm; String color1, color2, color3; @Override public void init() { // http://www.colordic.org/w/ ‚æ‚č”ēˆ hm = new HashMap(); hm.put("“ž", new Color(0xf7acbc)); hm.put("Ô", new Color(0xed1941)); hm.put("Žé", new Color(0xf26522)); hm.put("“", new Color(0xf58f98)); hm.put("”ę", new Color(0xaa2116)); hm.put("”§", new Color(0xfedcbd)); hm.put("žō", new Color(0xf47920)); hm.put("ŠŒ", new Color(0x843900)); hm.put("‰Đ", new Color(0xffd400)); hm.put("ęS", new Color(0xcbc547)); hm.put("éō", new Color(0x87943b)); hm.put("—Î", new Color(0x45b97c)); hm.put("“S", new Color(0x005344)); hm.put("…", new Color(0xafdfe4)); hm.put("Â", new Color(0x009ad6)); hm.put("—•", new Color(0x145b7d)); hm.put("Ū", new Color(0x003a6c)); hm.put("äŋ", new Color(0x6ff0aa)); hm.put("“Ą", new Color(0xafb4db)); hm.put("Ž‡", new Color(0x8552a1)); hm.put("”’", new Color(0xfffffb)); hm.put("ŠD", new Color(0x77787b)); hm.put("•", new Color(0x130c0e)); color1 = getParameter("Color1"); color2 = getParameter("Color2"); color3 = getParameter("Color3"); } @Override public void paint(Graphics g) { g.setFont(new Font("Sans", Font.BOLD, 64)); g.setColor(hm.get(color1)); g.drawString(color1, 10, 70); g.setColor(hm.get(color2)); g.drawString(color2, 90, 70); g.setColor(hm.get(color3)); g.drawString(color3, 170, 70); } }