How Do I Get Hex Code for Google Sheets? – Color Code in Google Sheets

The Hexadecimal code specifies the intensity of the color in Google Sheets. The hexadecimal color is usually specified with the code #RRGGBB. With the help of hexadecimal codes, we can change the intensity of the color in Google Sheets. By default, the sheets come with 80 colors, and any spreadsheet user who wishes to customize their colors apart from these 80 colors can get done using the hexadecimal code. And the spreadsheet owner who wishes to know the existing color codes in the spreadsheet can get to know them using various methods.

So, if you are a person who wants to know the hex code that has been used in Google Sheets, then this page is for you. On this page, we will provide you with all the necessary information on how to find the hex codes in the spreadsheet using Google Sheets Tips. Read further to find out more.

Table of Contents

How to Find Hex Codes in Google Sheets?

One of the simplest methods to find the hex code in Google Sheets is to use the “Fill Color” icon. The detailed steps on how to find the hex code in the spreadsheet using the Fill Color icon are explained below.

  • 1st Step: Open the Google Spreadsheet on your device.
  • 2nd Step: Now on the homepage, click on the “Fill Color” icon.
  • 3rd Step: From the Fill Color drop-down, click on the + icon from the “Custom” section.

hex code in google sheets

  • 4th Step: Now the Hex code window opens on the screen. Under the Hex box, you will find the custom hex color code.
  • 5th Step: Click on the “Ok” button to return to the spreadsheet.

hex code in google sheets

The method explained above is one of the simplest methods with the help of which one can easily find the Hex code in Google Sheets. Apart from the above-explained method, there are two more methods that lets the spreadsheet users find the color code. Let us explore what are those methods in the next section.

Building Hex Functions to Find Hex Color in Google Sheets

Google Sheets allows its users to build their own functions that help to find the Hex color code in the spreadsheet. In this example, we are creating a function named “GetColor.” The steps to get this on Google Sheets are explained below.

  • 1st Step: Launch the Spreadsheet.
  • 2nd Step: Access the code editor by clicking on Apps Script from the “Extensions” tab in the menubar.
  • 3rd Step: Now copy and paste the code which is provided in the table below.
  • 4th Step: Save the project and click on the “Run” tab.

hex code in google sheets

  • 5th Step: We have successfully created a project. Now let us start using the function “GetColor” in the spreadsheet.
function GetColor(input) {
  var myFormula = SpreadsheetApp.getActiveRange().getFormula();
  var myAddress = myFormula.replace(‘=GetColor(‘,”).replace(‘)’,”);
  var myRange = SpreadsheetApp.getActiveSheet().getRange(myAddress);
  return myRange.getBackground();
 } 

hex code in google sheets

The steps to find the hex color code using the GetColor function in Google Sheets are outlined below:

  • 1st Step: Open the Google Spreadsheet on your device.
  • 2nd Step: Now move to the cell which needs to result in the Hex color code.
  • 3rd Step: Type the formula “=GetColor (B1)“.
  • 4th Step: Press the “Return” key and you will find the results as shown in the image given below.

hex code in google sheets

Installing Extensions to Find Hex Color Codes in Google Sheets

One of the easiest methods to find the Hex color codes in the spreadsheet is to install Chrome. There are many chrome extensions available on the market, and one can choose any extension from those to find hex code in the spreadsheet. One of the popular chrome extensions which help to find hex codes is Easy Color Picker.

One can easily install the Easy Color Picker extension to find the hex code in Google Sheets.

Default Colors Available in Google Sheets with Hex Codes

As discussed above, a  total of 80 Hex color codes are available in Google Sheets. All 80 colors in the color picker are listed in the table below, along with their names and Hex codes.

Row# Color Name Hex code
1 black #000000
1 dark gray 4 #434343
1 dark gray 3 #666666
1 dark gray 2 #999999
1 dark gray 1 #b7b7b7
1 gray #cccccc
1 light gray 1 #d9d9d9
1 light gray 2 #efefef
1 light gray 3 #f3f3f3
1 white #ffffff
2 red berry #980000
2 red #ff0000
2 orange #ff9900
2 yellow #ffff00
2 green #00ff00
2 cyan #00ffff
2 cornflower blue #4a86e8
2 blue #0000ff
2 purple #9900ff
2 magenta #ff00ff
3 light red berry 3 #e6b8af
3 light red 3 #f4cccc
3 light orange 3 #fce5cd
3 light yellow 3 #fff2cc
3 light green 3 #d9ead3
3 light cyan 3 #d0e0e3
3 light cornflower blue 3 #c9daf8
3 light blue 3 #cfe2f3
3 light purple 3 #d9d2e9
3 light magenta 3 #ead1dc
4 light red berry 2 #dd7e6b
4 light red 2 #ea9999
4 light orange 2 #f9cb9c
4 light yellow 2 #ffe599
4 light green 2 #b6d7a8
4 light cyan 2 #a2c4c9
4 light cornflower blue 2 #a4c2f4
4 light blue 2 #9fc5e8
4 light purple 2 #b4a7d6
4 light magenta 2 #d5a6bd
5 light red berry 1 #cc4125
5 light red 1 #e06666
5 light orange 1 #f6b26b
5 light yellow 1 #ffd966
5 light green 1 #93c47d
5 light cyan 1 #76a5af
5 light cornflower blue 1 #6d9eeb
5 light blue 1 #6fa8dc
5 light purple 1 #8e7cc3
5 light magenta 1 #c27ba0
6 dark red berry 1 #a61c00
6 dark red 1 #cc0000
6 dark orange 1 #e69138
6 dark yellow 1 #f1c232
6 dark green 1 #6aa84f
6 dark cyan 1 #45818e
6 dark cornflower blue 1 #3c78d8
6 dark blue 1 #3d85c6
6 dark purple 1 #674ea7
6 dark magenta 1 #a64d79
7 dark red berry 2 #85200c
7 dark red 2 #990000
7 dark orange 2 #b45f06
7 dark yellow 2 #bf9000
7 dark green 2 #38761d
7 dark cyan 2 #134f5c
7 dark cornflower blue 2 #1155cc
7 dark blue 2 #0b5394
7 dark purple 2 #351c75
7 dark magenta 2 #741b47
8 dark red berry 3 #5b0f00
8 dark red 3 #660000
8 dark orange 3 #783f04
8 dark yellow 3 #7f6000
8 dark green 3 #274e13
8 dark cyan 3 #0c343d
8 dark cornflower blue 3 #1c4587
8 dark blue 3 #073763
8 dark purple 3 #20124d
8 dark magenta 3 #4c1130

Now that you are provided with all the necessary information about Hex color codes in Google Sheets. If you have any questions related to this page or in general about how to find hex color codes in the spreadsheet, reach us through the comment box below and we will get back to you as soon as possible.

Leave a Comment