Skip to content

RGB

See Also: Graphics Functions, B_From_RGB, G_From_RGB, R_From_RGB, RGB, Understanding RGB Colors

Purpose

Returns an RGB value for GDI functions from byte values representing Red, Green, and Blue color intensity.

Return Type

Integer

Syntax

Use RGB.pkg
(RGB({iRed}, {iGreen}, {iBlue}))

Where: - {iRed} is an integer value representing red color intensity. - {iGreen} is an integer value representing green color intensity. - {iBlue} is an integer value representing blue color intensity.

Examples

Use RGB.pkg

Procedure OnClick
    Integer rgbColor
    Integer iRed iGreen iBlue

    Get Value of oRColor to iRed
    Get Value of oGColor to iGreen
    Get Value of oBColor to iBlue

    Move (RGB(iRed, iGreen, iBlue)) to rgbColor
    Set TextColor of oText to rgbColor
    Set Value of oText to ("rgbColor = " + String(rgbColor))
End_Procedure