Chức năng VBScript RGB


❮ Toàn bộ tài liệu tham khảo VBScript

Hàm RGB trả về một số đại diện cho giá trị màu RGB.

Cú pháp

RGB(red,green,blue)

Parameter Description
red Required. A number from 0 to 255, inclusive, representing the red component of the color
green Required. A number from 0 to 255, inclusive, representing the green component of the color
blue Required. A number from 0 to 255, inclusive, representing the blue component of the color

Các ví dụ

ví dụ 1

<%

response.write(rgb(255,0,0))

%>

Đầu ra của đoạn mã trên sẽ là:

255

Ví dụ 2

<%

response.write(rgb(255,30,30))

%>

Đầu ra của đoạn mã trên sẽ là:

1974015

❮ Toàn bộ tài liệu tham khảo VBScript