⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 color.html

📁 我在学习JAVA的讲义
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<!--NewPage--><HTML><HEAD><TITLE>Color (Java 2 Platform SE v1.4.2)</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312"><!-- Generated by javadoc (build 1.4.2-rc) on Fri Jun 13 00:13:47 PDT 2003 -->
<META content="java.awt.Color class" name=keywords>
<META content=white name=keywords>
<META content=WHITE name=keywords>
<META content=lightGray name=keywords>
<META content=LIGHT_GRAY name=keywords>
<META content=gray name=keywords>
<META content=GRAY name=keywords>
<META content=darkGray name=keywords>
<META content=DARK_GRAY name=keywords>
<META content=black name=keywords>
<META content=BLACK name=keywords>
<META content=red name=keywords>
<META content=RED name=keywords>
<META content=pink name=keywords>
<META content=PINK name=keywords>
<META content=orange name=keywords>
<META content=ORANGE name=keywords>
<META content=yellow name=keywords>
<META content=YELLOW name=keywords>
<META content=green name=keywords>
<META content=GREEN name=keywords>
<META content=magenta name=keywords>
<META content=MAGENTA name=keywords>
<META content=cyan name=keywords>
<META content=CYAN name=keywords>
<META content=blue name=keywords>
<META content=BLUE name=keywords>
<META content=getRed() name=keywords>
<META content=getGreen() name=keywords>
<META content=getBlue() name=keywords>
<META content=getAlpha() name=keywords>
<META content=getRGB() name=keywords>
<META content=brighter() name=keywords>
<META content=darker() name=keywords>
<META content=hashCode() name=keywords>
<META content=equals() name=keywords>
<META content=toString() name=keywords>
<META content=decode() name=keywords>
<META content=getColor() name=keywords>
<META content=HSBtoRGB() name=keywords>
<META content=RGBtoHSB() name=keywords>
<META content=getHSBColor() name=keywords>
<META content=getRGBComponents() name=keywords>
<META content=getRGBColorComponents() name=keywords>
<META content=getComponents() name=keywords>
<META content=getColorComponents() name=keywords>
<META content=getColorSpace() name=keywords>
<META content=createContext() name=keywords>
<META content=getTransparency() name=keywords><LINK title=Style 
href="Color.files/stylesheet.css" type=text/css rel=stylesheet>
<SCRIPT type=text/javascript>function windowTitle(){    parent.document.title="Color (Java 2 Platform SE v1.4.2)";}</SCRIPT>

<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY bgColor=white onload=windowTitle();><!-- ========= START OF TOP NAVBAR ======= --><A 
name=navbar_top><!-- --></A><A title="Skip navigation links" 
href="file:///D:/Tools/j2sdk-1_4_2-doc/api/java/awt/Color.html#skip-navbar_top"></A>
<TABLE cellSpacing=0 cellPadding=1 width="100%" summary="" border=0>
  <TBODY>
  <TR>
    <TD class=NavBarCell1 bgColor=#eeeeff colSpan=3><A 
      name=navbar_top_firstrow><!-- --></A>
      <TABLE cellSpacing=3 cellPadding=0 summary="" border=0>
        <TBODY>
        <TR vAlign=top align=middle>
          <TD class=NavBarCell1 bgColor=#eeeeff><A 
            href="file:///D:/Tools/j2sdk-1_4_2-doc/api/overview-summary.html"><FONT 
            class=NavBarFont1><B>Overview</B></FONT></A>&nbsp;</TD>
          <TD class=NavBarCell1 bgColor=#eeeeff><A 
            href="file:///D:/Tools/j2sdk-1_4_2-doc/api/java/awt/package-summary.html"><FONT 
            class=NavBarFont1><B>Package</B></FONT></A>&nbsp;</TD>
          <TD class=NavBarCell1Rev bgColor=#ffffff>&nbsp;<FONT 
            class=NavBarFont1Rev><B>Class</B></FONT>&nbsp;</TD>
          <TD class=NavBarCell1 bgColor=#eeeeff><A 
            href="file:///D:/Tools/j2sdk-1_4_2-doc/api/java/awt/class-use/Color.html"><FONT 
            class=NavBarFont1><B>Use</B></FONT></A>&nbsp;</TD>
          <TD class=NavBarCell1 bgColor=#eeeeff><A 
            href="file:///D:/Tools/j2sdk-1_4_2-doc/api/java/awt/package-tree.html"><FONT 
            class=NavBarFont1><B>Tree</B></FONT></A>&nbsp;</TD>
          <TD class=NavBarCell1 bgColor=#eeeeff><A 
            href="file:///D:/Tools/j2sdk-1_4_2-doc/api/deprecated-list.html"><FONT 
            class=NavBarFont1><B>Deprecated</B></FONT></A>&nbsp;</TD>
          <TD class=NavBarCell1 bgColor=#eeeeff><A 
            href="file:///D:/Tools/j2sdk-1_4_2-doc/api/index-files/index-1.html"><FONT 
            class=NavBarFont1><B>Index</B></FONT></A>&nbsp;</TD>
          <TD class=NavBarCell1 bgColor=#eeeeff><A 
            href="file:///D:/Tools/j2sdk-1_4_2-doc/api/help-doc.html"><FONT 
            class=NavBarFont1><B>Help</B></FONT></A>&nbsp;</TD></TR></TBODY></TABLE></TD>
    <TD vAlign=top align=right rowSpan=3><EM><B>Java<SUP><FONT 
      size=-2>TM</FONT></SUP>&nbsp;2&nbsp;Platform<BR>Std.&nbsp;Ed. 
      v1.4.2</B></EM> </TD></TR>
  <TR>
    <TD class=NavBarCell2 bgColor=white><FONT size=-2>&nbsp;<A 
      title="class in java.awt" 
      href="file:///D:/Tools/j2sdk-1_4_2-doc/api/java/awt/Choice.AccessibleAWTChoice.html"><B>PREV 
      CLASS</B></A>&nbsp; &nbsp;<A title="class in java.awt" 
      href="file:///D:/Tools/j2sdk-1_4_2-doc/api/java/awt/Component.html"><B>NEXT 
      CLASS</B></A></FONT></TD>
    <TD class=NavBarCell2 bgColor=white><FONT size=-2><A 
      href="file:///D:/Tools/j2sdk-1_4_2-doc/api/index.html" 
      target=_top><B>FRAMES</B></A> &nbsp; &nbsp;<A 
      href="file:///D:/Tools/j2sdk-1_4_2-doc/api/java/awt/Color.html" 
      target=_top><B>NO FRAMES</B></A> &nbsp; &nbsp;
      <SCRIPT type=text/javascript>  <!--  if(window==top) {    document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');  }  //--></SCRIPT>
       <NOSCRIPT><A 
      href="file:///D:/Tools/j2sdk-1_4_2-doc/api/allclasses-noframe.html"><B>All 
      Classes</B></A> </NOSCRIPT></FONT></TD></TR>
  <TR>
    <TD class=NavBarCell3 vAlign=top><FONT 
      size=-2>SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A 
      href="file:///D:/Tools/j2sdk-1_4_2-doc/api/java/awt/Color.html#field_summary">FIELD</A>&nbsp;|&nbsp;<A 
      href="file:///D:/Tools/j2sdk-1_4_2-doc/api/java/awt/Color.html#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A 
      href="file:///D:/Tools/j2sdk-1_4_2-doc/api/java/awt/Color.html#method_summary">METHOD</A></FONT></TD>
    <TD class=NavBarCell3 vAlign=top><FONT size=-2>DETAIL:&nbsp;<A 
      href="file:///D:/Tools/j2sdk-1_4_2-doc/api/java/awt/Color.html#field_detail">FIELD</A>&nbsp;|&nbsp;<A 
      href="file:///D:/Tools/j2sdk-1_4_2-doc/api/java/awt/Color.html#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A 
      href="file:///D:/Tools/j2sdk-1_4_2-doc/api/java/awt/Color.html#method_detail">METHOD</A></FONT></TD></TR></TBODY></TABLE><A 
name=skip-navbar_top></A><!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2><FONT size=-1>java.awt</FONT> <BR>Class Color</H2><PRE><A title="class in java.lang" href="file:///D:/Tools/j2sdk-1_4_2-doc/api/java/lang/Object.html">java.lang.Object</A>
  <IMG alt="extended by" src="Color.files/inherit.gif"><B>java.awt.Color</B>
</PRE>
<DL>
  <DT><B>All Implemented Interfaces:</B> 
  <DD><A title="interface in java.awt" 
  href="file:///D:/Tools/j2sdk-1_4_2-doc/api/java/awt/Paint.html">Paint</A>, <A 
  title="interface in java.io" 
  href="file:///D:/Tools/j2sdk-1_4_2-doc/api/java/io/Serializable.html">Serializable</A>, 
  <A title="interface in java.awt" 
  href="file:///D:/Tools/j2sdk-1_4_2-doc/api/java/awt/Transparency.html">Transparency</A> 
  </DD></DL>
<DL>
  <DT><B>Direct Known Subclasses:</B> 
  <DD><A title="class in javax.swing.plaf" 
  href="file:///D:/Tools/j2sdk-1_4_2-doc/api/javax/swing/plaf/ColorUIResource.html">ColorUIResource</A>, 
  <A title="class in java.awt" 
  href="file:///D:/Tools/j2sdk-1_4_2-doc/api/java/awt/SystemColor.html">SystemColor</A> 
  </DD></DL>
<HR>

<DL>
  <DT>public class <B>Color</B>
  <DT>extends <A title="class in java.lang" 
  href="file:///D:/Tools/j2sdk-1_4_2-doc/api/java/lang/Object.html">Object</A>
  <DT>implements <A title="interface in java.awt" 
  href="file:///D:/Tools/j2sdk-1_4_2-doc/api/java/awt/Paint.html">Paint</A>, <A 
  title="interface in java.io" 
  href="file:///D:/Tools/j2sdk-1_4_2-doc/api/java/io/Serializable.html">Serializable</A></DT></DL>
<P>The <CODE>Color</CODE> class is used encapsulate colors in the default sRGB 
color space or colors in arbitrary color spaces identified by a <A 
title="class in java.awt.color" 
href="file:///D:/Tools/j2sdk-1_4_2-doc/api/java/awt/color/ColorSpace.html"><CODE>ColorSpace</CODE></A>. 
Every color has an implicit alpha value of 1.0 or an explicit one provided in 
the constructor. The alpha value defines the transparency of a color and can be 
represented by a float value in the range 0.0&nbsp;-&nbsp;1.0 or 
0&nbsp;-&nbsp;255. An alpha value of 1.0 or 255 means that the color is 
completely opaque and an alpha value of 0 or 0.0 means that the color is 
completely transparent. When constructing a <CODE>Color</CODE> with an explicit 
alpha or getting the color/alpha components of a <CODE>Color</CODE>, the color 
components are never premultiplied by the alpha component. 
<P>The default color space for the Java 2D(tm) API is sRGB, a proposed standard 
RGB color space. For further information on sRGB, see <A 
href="http://www.w3.org/pub/WWW/Graphics/Color/sRGB.html">http://www.w3.org/pub/WWW/Graphics/Color/sRGB.html</A>. 

<P>
<P>
<P>
<DL>
  <DT><B>See Also:</B>
  <DD><A title="class in java.awt.color" 
  href="file:///D:/Tools/j2sdk-1_4_2-doc/api/java/awt/color/ColorSpace.html"><CODE>ColorSpace</CODE></A>, 
  <A title="class in java.awt" 
  href="file:///D:/Tools/j2sdk-1_4_2-doc/api/java/awt/AlphaComposite.html"><CODE>AlphaComposite</CODE></A>, 
  <A 
  href="file:///D:/Tools/j2sdk-1_4_2-doc/api/serialized-form.html#java.awt.Color">Serialized 
  Form</A></DD></DL>
<HR>

<P><!-- ======== NESTED CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A 
name=field_summary><!-- --></A>
<TABLE cellSpacing=0 cellPadding=3 width="100%" summary="" border=1>
  <TBODY>
  <TR class=TableHeadingColor bgColor=#ccccff>
    <TD colSpan=2><FONT size=+2><B>Field Summary</B></FONT></TD></TR>
  <TR class=TableRowColor bgColor=white>
    <TD vAlign=top align=right width="1%"><FONT size=-1><CODE>static&nbsp;<A 
      title="class in java.awt" 
      href="file:///D:/Tools/j2sdk-1_4_2-doc/api/java/awt/Color.html">Color</A></CODE></FONT></TD>
    <TD><CODE><B><A 
      href="file:///D:/Tools/j2sdk-1_4_2-doc/api/java/awt/Color.html#black">black</A></B></CODE> 
      <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The color 
      black.</TD></TR>
  <TR class=TableRowColor bgColor=white>
    <TD vAlign=top align=right width="1%"><FONT size=-1><CODE>static&nbsp;<A 
      title="class in java.awt" 
      href="file:///D:/Tools/j2sdk-1_4_2-doc/api/java/awt/Color.html">Color</A></CODE></FONT></TD>
    <TD><CODE><B><A 
      href="file:///D:/Tools/j2sdk-1_4_2-doc/api/java/awt/Color.html#BLACK">BLACK</A></B></CODE> 
      <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The color 
      black.</TD></TR>
  <TR class=TableRowColor bgColor=white>
    <TD vAlign=top align=right width="1%"><FONT size=-1><CODE>static&nbsp;<A 
      title="class in java.awt" 
      href="file:///D:/Tools/j2sdk-1_4_2-doc/api/java/awt/Color.html">Color</A></CODE></FONT></TD>
    <TD><CODE><B><A 
      href="file:///D:/Tools/j2sdk-1_4_2-doc/api/java/awt/Color.html#blue">blue</A></B></CODE> 
      <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The color 
      blue.</TD></TR>
  <TR class=TableRowColor bgColor=white>
    <TD vAlign=top align=right width="1%"><FONT size=-1><CODE>static&nbsp;<A 
      title="class in java.awt" 
      href="file:///D:/Tools/j2sdk-1_4_2-doc/api/java/awt/Color.html">Color</A></CODE></FONT></TD>
    <TD><CODE><B><A 
      href="file:///D:/Tools/j2sdk-1_4_2-doc/api/java/awt/Color.html#BLUE">BLUE</A></B></CODE> 
      <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The color 
      blue.</TD></TR>
  <TR class=TableRowColor bgColor=white>
    <TD vAlign=top align=right width="1%"><FONT size=-1><CODE>static&nbsp;<A 
      title="class in java.awt" 
      href="file:///D:/Tools/j2sdk-1_4_2-doc/api/java/awt/Color.html">Color</A></CODE></FONT></TD>
    <TD><CODE><B><A 
      href="file:///D:/Tools/j2sdk-1_4_2-doc/api/java/awt/Color.html#cyan">cyan</A></B></CODE> 
      <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The color 
      cyan.</TD></TR>
  <TR class=TableRowColor bgColor=white>
    <TD vAlign=top align=right width="1%"><FONT size=-1><CODE>static&nbsp;<A 
      title="class in java.awt" 
      href="file:///D:/Tools/j2sdk-1_4_2-doc/api/java/awt/Color.html">Color</A></CODE></FONT></TD>
    <TD><CODE><B><A 
      href="file:///D:/Tools/j2sdk-1_4_2-doc/api/java/awt/Color.html#CYAN">CYAN</A></B></CODE> 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -