Skip to content

B_From_RGB

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

Purpose

Returns a byte value representing the Blue color intensity value of an RGB integer.

Return Type

Integer

Syntax

Use RGB.pkg
(B_From_RGB({rgbColor}))

Where:

  • {rgbColor} is an RGB color value.

Examples

Use RGB.pkg

Procedure OnClick
    Integer rgbColor
    Integer iRed iGreen iBlue

    Get Value of oColor to rgbColor
    Set TextColor of oText to rgbColor
Move (R_From_RGB(rgbColor)) to iRed
Move (G_From_RGB(rgbColor)) to iGreen
Move (B_From_RGB(rgbColor)) to iBlue
Set Value of oText to ("Red = " + string(iRed) + ", " + ;
                       "Green = " + string(iGreen) + ", " + ;
                       "Blue = " + string(iBlue))
End_Procedure