XL.HexColorToRGB function: convert Hex color code to RGB format

How to use HexColorToRGB function for Excel: formula and results
XL.HexColorToRGB function – Text function type – сonverts a text string with Hex color code like #RRGGBB to its equivalent in RGB format.

For example, Hex color code #FFFFFF will be transformed to RGB format rgb(255, 255, 255)

Before you begin, add Functions to Excel

Functions are one of the 20+ features within XLTools Add-in for Excel. Works in Excel 2019, 2016, 2013, 2010, desktop Office 365.

Get started with XLTools ribbon
– free trial gives you 14 days of full access to all features.

Syntax

=XL.HexColorToRGB(colorHex)
ArgumentDescription
colorHex
[required]
A hexadecimal formatted color string like #RRGGBB

Examples [download]

Download this spreadsheet with examples and try the function yourself.


FormulaDescription
=XL.HexColorToRGB("#FFFFFF")Converts Hex color code #FFFFFF to RGB format
=XL.HexColorToRGB(B3)Converts Hex color code in cell B3 to RGB format

Any questions or suggestions?
How can we help?