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

📄 vbs172.htm

📁 VBScript 是一种脚本语言
💻 HTM
字号:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"><HTML>
<HEAD>
<TITLE>RGB Function</TITLE> 
<META NAME="CATEGORY" CONTENT="Language Reference"> 
<META NAME="MS.LOCALE" CONTENT="EN-US">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso8859-1">
<META NAME="PRODUCT" CONTENT="Visual Basic Scripting Edition">
<META NAME="TECHNOLOGY" CONTENT="SCRIPTING">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="RGB Function">
</HEAD>

<BODY BGCOLOR=FFFFFF LINK=#0033CC>
<!--TOOLBAR_START-->
<!--TOOLBAR_EXEMPT-->
<!--TOOLBAR_END-->
<FONT FACE="Verdana, Arial, Helvetica" SIZE=2>
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%><TR VALIGN=TOP><TD WIDTH=360>
<FONT SIZE=1 COLOR=#660033>Microsoft&#174; Visual Basic&#174; Scripting Edition</FONT><BR>
<FONT SIZE=5 COLOR=#660033><B>RGB Function</B></FONT>

</TD>
<TD ALIGN=RIGHT>
<FONT SIZE=2>&nbsp;<A HREF="vbstoc.htm">Language&nbsp;Reference</A>&nbsp;<BR>
<A HREF="vbs16.htm">Version&nbsp;2</A>&nbsp;<P></FONT>

</TD></TR>
</TABLE> <P>
<!--FONT FACE="Verdana, Arial, Helvetica" SIZE=2>
<A HREF="vsfctRGBC.htm">See Also</A></FONT-->
<HR NOSHADE SIZE=1>

<H5>Description</H5>
<BLOCKQUOTE>Returns a whole number representing an RGB color value.</BLOCKQUOTE>

<H5>Syntax</H5>
<BLOCKQUOTE><b>RGB(</b><i>red</i>, <i>green</i>, <i>blue</i><b>)</b><P>
The <b>RGB</b> function has these parts:<p>

<TABLE WIDTH=87% BORDER=1 CELLPADDING=5 CELLSPACING=0>
<TR VALIGN=TOP BGCOLOR="#DDDDDD">
<TD><FONT SIZE=2><b>Part</b></FONT></TD>
<TD><FONT SIZE=2><b>Description</b></FONT></TD></TR>
<TR VALIGN=TOP>
<TD><FONT SIZE=2><i>red</i></FONT></TD>
<TD><FONT SIZE=2>Required. Number in the range 0-255 representing the red component of the color.</FONT></TD></TR>
<TR VALIGN=TOP>
<TD><FONT SIZE=2><i>green</i></FONT></TD>
<TD><FONT SIZE=2>Required. Number in the range 0-255 representing the green component of the color.</FONT></TD></TR>
<TR VALIGN=TOP>
<TD><FONT SIZE=2><i>blue</i></FONT></TD>
<TD><FONT SIZE=2>Required. Number in the range 0-255 representing the blue component of the color.</FONT></TD></TR>
</TABLE>

</BLOCKQUOTE><P>

<H5>Remarks</H5>
<BLOCKQUOTE>
Application methods and properties that accept a color specification expect that specification to be a number representing an RGB color value. An RGB color value specifies the relative intensity of red, green, and blue to cause a specific color to be displayed.
<p>The low-order byte contains the value for red, the middle byte contains the value for green, and the high-order byte contains the value for blue.

<p>For applications that require the byte order to be reversed, the following function will provide the same information with the bytes reversed:

<BLOCKQUOTE><pre><font face="Courier New" size=3>Function RevRGB(red, green, blue)
    RevRGB= CLng(blue + (green * 256) + (red * 65536))
End Function</font></pre></BLOCKQUOTE>

<p>The value for any argument to RGB that exceeds 255 is assumed to be 255.

</BLOCKQUOTE>

<hr noshade size=1>
<p align=center><em><a href="../../common/colegal.htm">&copy; 1997 by Microsoft Corporation. All rights reserved.</a></em></p> 


</FONT></BODY></HTML>




⌨️ 快捷键说明

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