Get Background Hex Code FILL COLOR

Learn how to easily retrieve the background color of a cell in hex code format using a simple custom function in Google Sheets. This tutorial demonstrates the process step-by-step, making it accessible for all users.

We can get the background color in hex code with just, just a single function . Here's all the hex codes of these colors and fill hex. There's white. And you'd be surprised to know this is only one line of script. Let's do this. Go up to Extensions app script . When you first open this up, you'll probably see that this is function , my function . We're gonna call this fill Hex. And the only thing we're gonna do is return something, which is spreadsheet app dot get active range . Do get background. The output of this GI background is the hex code or the color in hex code format of whatever this active range is when we run this function.

So let's save this command S and I wanna do one more thing, which is I'm gonna add a slash. At custom function , and this custom function means I can call this fill Hex all caps, and when I come back to my sheet, I'm gonna do equals fill Hex and it's gonna show up as a native function , almost as a native function . fill Hex in parentheses, hit enter and there is the hex code of that background color . You are watching better sheets here on YouTube. Make sure you check out this video or this video and subscribe right now to get more tips, tricks, how tos, get more out of your Google sheets than you ever have before. I'm excited to be making a ton more videos here. Ask me questions down in the comments and I will answer them in future videos.

But for right now, right here, one of these videos is gonna be your next Google sheet.