PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • HTML color
  • RGB function and code editor
  • Various
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Describes a color from its Red, Green and Blue components.
Versions 15 and later
Android This function is now available for the Android applications.
New in version 15
Android This function is now available for the Android applications.
Android This function is now available for the Android applications.
Versions 16 and later
Universal Windows 10 App This function is now available for the Windows Phone applications.
New in version 16
Universal Windows 10 App This function is now available for the Windows Phone applications.
Universal Windows 10 App This function is now available for the Windows Phone applications.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
// Color an area in light blue
dFill(10, 50, RGB(0, 255, 255))
Syntax
<Result> = RGB(<Red Component> , <Green Component> , <Blue Component>)
<Result>: Integer
Color (24 bits) corresponding to the selected components. This color is the result of the following formula:
Color = 65536 * Blue Component + 256 * Green Component + Red Component.
WEBDEV - Browser code The color is returned in the format of a character string by the browser.
<Red Component>: Integer (from 0 to 255)
Amount of red in the color.
<Green Component>: Integer (from 0 to 255)
Amount of green in the color.
<Blue Component>: Integer (from 0 to 255)
Amount of blue in the color.
Remarks
WEBDEV - Server codeAjax

HTML color

In an HTML page, the colors are represented by a character string such as "#RRGGBB". RR, GG and BB represent the hexadecimal value of red, green and blue components.
The following code allows you to convert an HTML color into an RGB color:
nRGB is int
HTMLColor is string
// If the HTML color has no #
nRGB = RGB(Val(Left(HTMLColor, 2), "x"), ...
Val(Middle(HTMLColor, 3, 2), "x"), ...
Val(Right(HTMLColor, 2), "x"))
// If the HTML color contains #
nRGB = RGB(Val(Middle(HTMLColor, 2, 2), "x"), ...
Val(Middle(HTMLColor, 4, 2), "x"), ...
Val(Right(HTMLColor, 2), "x"))
Versions 16 and later
You now have the ability to use RGBToHTML.
New in version 16
You now have the ability to use RGBToHTML.
You now have the ability to use RGBToHTML.
Versions 22 and later

RGB function and code editor

In the code editor, typing the RGB function with its parameters automatically displays a square with the corresponding color:
A click in the colored square is used to open the color picker.
If the color is modified, the modification is taken into account when validating the color picker.
New in version 22

RGB function and code editor

In the code editor, typing the RGB function with its parameters automatically displays a square with the corresponding color:
A click in the colored square is used to open the color picker.
If the color is modified, the modification is taken into account when validating the color picker.

RGB function and code editor

In the code editor, typing the RGB function with its parameters automatically displays a square with the corresponding color:
A click in the colored square is used to open the color picker.
If the color is modified, the modification is taken into account when validating the color picker.

Various

  • The requested colors can be modified according to the capacity of the current screen mode (EGA, 32 colors, etc.).
  • Important: To specify the colors, we recommend that you use the color constants defined in WLanguage (see the preset colors of WLanguage).
Components
WINDEVWEBDEV - Server codeReports and Queries wd230std.dll
Windows Mobile wp230std.dll
WEBDEV - Browser code WDJS.DLL
Java wd230java.jar
Linux wd230std.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment