Home Search

DriveWorks Pro 22

Send Feedback


Returns a hexadecimal color value from the specified red, green, blue and opacity values. Suitable for use with DriveWorks User Forms.




Red is a value from 0 to 255 (inclusive).

Green is a value from 0 to 255 (inclusive).

Blue is a value from 0 to 255 (inclusive).

Opacity (optional) is a value from 0 to 255 (inclusive) representing how opaque the color should be. 0 being totally transparent and 255 meaning fully opaque. If omitted the opacity is set to 255 by default.

Forms and form controls use hexadecimal values to alter the displayed color.



ColorHex(255, 255, 255) Returns: #FFFFFF
ColorHex(DWVariableRed,DWVariableGreen,DWVariableBlue,20) Returns the hexadecimal equivalent from the results of the Variables Red, Green and Blue with an Opacity of 20

DriveWorks Tech Tips Portal

RGB Hex Conversion

This Tech Tip demonstrates how to convert RGB values into Hex values the ColorHex function.

View all Tech Tips

DriveWorks Tech Tips Portal is available to DriveWorks Pro customers with an active subscription and support contract.

Tech Tips provide cut down projects that highlight specific functionality for faster and more effective learning.

To access the portal:

  1. Go to https://my.driveworks.co.uk/learn/tech-tips/
  2. Login with your DriveWorks Pro account credentials, if asked
  3. Click the Visit Tech Tips Portal button for access

The portal provides a search facility, start typing the name of the Tech Tip (as indicated above) to display the Tip you require.