You can use the Number Format dropdown in the Home tab of the Excel ribbon to display RGB colors in a cell. To do this, first select the cell or cells you want to format. Then, in the Home tab, click the Number Format dropdown and select Custom. In the Format Cells dialog box that appears, enter the following code in the Type field:
[RGB(R,G,B)]
where R = red value (0-255), G = green value (0-255), B = blue value (0-255)
Click OK. The selected cells will now display the corresponding RGB color.