JavaFX中設置顏色效果的方法大全

// liangxin 2020-04-15
 Color c = Color.BLUE;   //use the blue constant
 Color c = new Color(0,0,1,1.0); // standard constructor, use 0->1.0 values, explicit alpha of 1.0

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

 Color c = Color.rgb(0,0,255); //use 0->255 integers, implicit alpha of 1.0
 Color c = Color.rgb(0,0,255,1.0); //use 0->255 integers, explicit alpha of 1.0

 Color c = Color.hsb(270,1.0,1.0); //hue = 270, saturation & value = 1.0. inplicit alpha of 1.0
 Color c = Color.hsb(270,1.0,1.0,1.0); //hue = 270, saturation & value = 1.0, explicit alpha of 1.0

 Color c = Color.web("0x0000FF",1.0);// blue as a hex web value, explicit alpha
 Color c = Color.web("0x0000FF");// blue as a hex web value, implicit alpha
 Color c = Color.web("0x00F");// blue as a short hex web value, implicit alpha
 Color c = Color.web("#0000FF",1.0);// blue as a hex web value, explicit alpha
 Color c = Color.web("#0000FF");// blue as a hex web value, implicit alpha
 Color c = Color.web("#00F");// blue as a short hex web value, implicit alpha
 Color c = Color.web("0000FF",1.0);// blue as a hex web value, explicit alpha
 Color c = Color.web("0000FF");// blue as a hex web value, implicit alpha
 Color c = Color.web("00F");// blue as a short hex web value, implicit alpha
 Color c = Color.web("rgba(0,0,255,1.0)");// blue as an rgb web value, explicit alpha
 Color c = Color.web("rgb(0,0,255)");// blue as an rgb web value, implicit alpha
 Color c = Color.web("rgba(0,0,100%,1.0)");// blue as an rgb percent web value, explicit alpha
 Color c = Color.web("rgb(0,0,100%)");// blue as an rgb percent web value, implicit alpha
 Color c = Color.web("hsla(270,100%,100%,1.0)");// blue as an hsl web value, explicit alpha
 Color c = Color.web("hsl(270,100%,100%)");// blue as an hsl web value, implicit alpha
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章