2008年12月18日木曜日

JavaFX Color (scene)

standard name 一覧はこちら
More...

var colors = [
"ALICEBLUE",
"ANTIQUEWHITE",
"AQUA",
"AQUAMARINE",
"AZURE",
"BEIGE",
"BISQUE",
"BLACK",
"BLANCHEDALMOND",
"BLUE",
"BLUEVIOLET",
"BROWN",
"BURLYWOOD",
"CADETBLUE",
"CHARTREUSE",
"CHOCOLATE",
"CORAL",
"CORNFLOWERBLUE",
"CORNSILK",
"CRIMSON",
"CYAN",
"DARKBLUE",
"DARKCYAN",
"DARKGOLDENROD",
"DARKGRAY",
"DARKGREEN",
"DARKGREY",
"DARKKHAKI",
"DARKMAGENTA",
"DARKOLIVEGREEN",
"DARKORANGE",
"DARKORCHID",
"DARKRED",
"DARKSALMON",
"DARKSEAGREEN",
"DARKSLATEBLUE",
"DARKSLATEGRAY",
"DARKSLATEGREY",
"DARKTURQUOISE",
"DARKVIOLET",
"DEEPPINK",
"DEEPSKYBLUE",
"DIMGRAY",
"DIMGREY",
"DODGERBLUE",
"FIREBRICK",
"FLORALWHITE",
"FORESTGREEN",
"FUCHSIA",
"GAINSBORO",
"GHOSTWHITE",
"GOLD",
"GOLDENROD",
"GRAY",
"GREEN",
"GREENYELLOW",
"GREY",
"HONEYDEW",
"HOTPINK",
"INDIANRED",
"INDIGO",
"IVORY",
"KHAKI",
"LAVENDER",
"LAVENDERBLUSH",
"LAWNGREEN",
"LEMONCHIFFON",
"LIGHTBLUE",
"LIGHTCORAL",
"LIGHTCYAN",
"LIGHTGOLDENRODYELLOW",
"LIGHTGRAY",
"LIGHTGREEN",
"LIGHTGREY",
"LIGHTPINK",
"LIGHTSALMON",
"LIGHTSEAGREEN",
"LIGHTSKYBLUE",
"LIGHTSLATEGRAY",
"LIGHTSLATEGREY",
"LIGHTSTEELBLUE",
"LIGHTYELLOW",
"LIME",
"LIMEGREEN",
"LINEN",
"MAGENTA",
"MAROON",
"MEDIUMAQUAMARINE",
"MEDIUMBLUE",
"MEDIUMORCHID",
"MEDIUMPURPLE",
"MEDIUMSEAGREEN",
"MEDIUMSLATEBLUE",
"MEDIUMSPRINGGREEN",
"MEDIUMTURQUOISE",
"MEDIUMVIOLETRED",
"MIDNIGHTBLUE",
"MINTCREAM",
"MISTYROSE",
"MOCCASIN",
"NAVAJOWHITE",
"NAVY",
"OLDLACE",
"OLIVE",
"OLIVEDRAB",
"ORANGE",
"ORANGERED",
"ORCHID",
"PALEGOLDENROD",
"PALEGREEN",
"PALETURQUOISE",
"PALEVIOLETRED",
"PAPAYAWHIP",
"PEACHPUFF",
"PERU",
"PINK",
"PLUM",
"POWDERBLUE",
"PURPLE",
"RED",
"ROSYBROWN",
"ROYALBLUE",
"SADDLEBROWN",
"SALMON",
"SANDYBROWN",
"SEAGREEN",
"SEASHELL",
"SIENNA",
"SILVER",
"SKYBLUE",
"SLATEBLUE",
"SLATEGRAY",
"SLATEGREY",
"SNOW",
"SPRINGGREEN",
"STEELBLUE",
"TAN",
"TEAL",
"THISTLE",
"TOMATO",
"TURQUOISE",
"VIOLET",
"WHEAT",
"WHITE",
"WHITESMOKE",
"YELLOW",
"YELLOWGREEN"];




import javafx.scene.paint.Color;

// standard name
var c = Color.RED

// standard constructor
var c = Color { red: 0 green: 0 blue: 1.0 };

//use 0->1.0 values. implicit alpha of 1.0
var c = Color.color(0,0,1.0);
var c = Color.color(0,0,1.0,1.0);

// RGB
//use 0->255 integers, implict alpha of 1.0
var c = Color.rgb(0,0,255);
var c = Color.rgb(0,0,255,1.0);

// HSB
//hue = 270, saturation & value = 1.0. inplict alpha of 1.0
var c = Color.hsb(270,1.0,1.0);
var c = Color.hsb(270,1.0,1.0,1.0);

// web Color
// blue as a hex web value, explict alpha
var c = Color.web("0x0000FF",1.0);
var c = Color.web("0x0000FF");
var c = Color.web("#0000FF",1.0);
var c = Color.web("#0000FF");
var c = Color.web("0000FF",1.0);
var c = Color.web("0000FF");

//convert from an AWT color
var c = Color.fromAWTColor(java.awt.Color.BLUE };

0 件のコメント:

コメントを投稿