Hex in excel for color

Содержание

  1. Excel Format Colors
  2. Colors
  3. Theme and Standard Colors
  4. Hexadecimal Colors
  5. RGB Colors
  6. Applying colors
  7. How to convert color codes (RGB, HSL, HSV, Hex, Long, CMYK)
  8. Excel’s different color code formats
  9. User Defined Functions for color conversion
  10. Convert from RGB to hex
  11. Convert from hex to RGB
  12. Convert from RGB to long
  13. Convert from long to RGB
  14. Convert from long to hex
  15. Convert from hex to long
  16. Convert from RGB to HSL
  17. Convert from HSL to RGB
  18. Convert from RGB to CMYK
  19. Convert from CMYK to RGB
  20. Convert from RGB to HSV
  21. Convert from HSV to RGB
  22. Color conversion add-in
  23. Conclusion

Excel Format Colors

Colors

Colors are specified by selection or by using Hexadecimal and RGB codes.

Tip: You can learn more about colors in our HTML/CSS Colors Tutorial.

Theme and Standard Colors

Excel has a set of themes and standard colors available for use. You select a color by clicking it:

The «More Colors» option allows you to select custom colors by entering a RGB or HEX code.

Hexadecimal Colors

Excel supports Hexadecimal color values

A hexadecimal color is specified with: # RR GG BB .

RR (red), GG (green) and BB (blue) are hexadecimal integers between 00 and FF specifying the intensity of the color.

For example, #0000FF is displayed as blue, because the blue component is set to its highest value (FF) and the others are set to 00.

RGB Colors

Excel supports RGB color values.

An RGB color value is specified with: rgb( RED , GREEN , BLUE ) .

Each parameter defines the intensity of the color as an integer between 0 and 255.

For example, rgb(0,0,255) is rendered as blue, because the blue parameter is set to its highest value (255) and the others are set to 0.

Tip: Try W3schools.com color picker to find your color! https://www.w3schools.com/colors/colors_picker.asp

Applying colors

Colors can be applied to cells, text and borders.

Colors are applied to cells by using the «Fill color» function.

How to apply colors to cells:

  1. Select color
  2. Select range
  3. Click the Fill Color button

The «Fill color» button remembers the color you used the last time.

Color options are explored by clicking on the arrow-down icon (), next to the Fill color command:

The option allows selection of theme colors, standard colors or use of HEX or RGB codes by clicking on the More Colors option:

Colors are made from red, green, blue and are universal. Entering a color in one way will give you the code in the other. For example if you enter a HEX code, it will give you the RGB code for the same color.

Let’s try some examples.

Starting with theme and standard colors:

Great!

Try to apply the following colors:

  • Theme color blue (accent 5) to A3:F3.
  • Theme color green (accent 6) and A5:F5.

Did you make it?

Let’s apply colors using HEX and RGB codes.

Apply HEX code #ffcb05 to A7:F7:

  1. Select A7:F7
  2. Open color options
  3. Click More colors
  4. Insert #ffcb05 in the HEX input field
  5. Hit enter

Notice that applying the HEX code gives the RGB code for the same color, and shows where that color is positioned on the color map.

Apply RGB code 60 , 90 , 166 to A9:F9

  • Select A9:F9
  • Open color options
  • Click More colors
  • Insert 60 , 90 , 166 in the RGB input field
  • Hit enter

Notice that entering the RGB code also gives the HEX code and shows you where the color is positioned on the color map.

Well done! You have successfully applied colors using the standard, theme, HEX and RGB codes.

Источник

How to convert color codes (RGB, HSL, HSV, Hex, Long, CMYK)

I often find myself converting between different formats of color codes; especially from hex to RGB and back again. Rather than firing up Google and searching for color conversion tools online, I decided to write my own User Defined Functions in Excel, now I can calculate the result within a worksheet instead.

The functions in this post include the conversions for RGB, hex, HSL, HSV, CMYK and long formats.

Using these color conversion functions, I created an add-in that makes the conversion even easier. Keep reading to find out how you can download the add-in for free.

Download the example file: Click the link below to download the example file used for this post:

The downloads include:

  • 0006 Convert color codes.xlsm – includes all the custom functions
  • ColorCodeConverter.xlam – Excel add-in for color conversion
  • Add-in installation instructions.pdf – Add-in installation & xlsm unblocking instructions

Excel’s different color code formats

Even in Excel, there are four different methods of defining color; RGB, hex, HSL and long.

The RGB (Red, Green and Blue) color code is used within the standard color dialog box.

The individual colors Red, Green and Blue each have 256 different shades, which when mixed can create 16,777,216 different color combinations.

Within the standard color dialog box there is another code format; using the color model drop-down we can change to HSL. HSL uses Hue, Saturation and Luminance to create the color.

HSL tries to define colors closer to the way humans think about colors.

  • Hue – is the degree on the color wheel from 0 to 360. 0 is red, 120 is green, 240 is blue.
  • Saturation – is a percentage of the amount of color included. 100% is full color, 0% is no color (i.e. all grey)
  • Luminance (or lightness) – is a percentage of grey. 0% is black, 100% is white.

Frustratingly, Excel does not handle HSL in the standard way. Instead, Excel measures all the numbers where 0 is the lowest and 255 is the biggest. But, it’s a quirk we can handle.

The long color code is used by VBA when displaying the color property of an item. The following macro displays the long code for the fill of the active cell.

Select a cell and run the macro.

The long code is a number from 0 to 16,777,215, where each separate number represents a color. The relationship between RGB and long is based on a simple calculation:

Long = Blue x 256 x 256 + Green x 256 + Red

  • Where Red: 33, Green: 115 and Blue: 70
  • The result calculates as 70 x 256 x 256 + 115 x 256 + 33 = 4,616,993

Long and RGB are related; they are just different ways of calculating the same number.

Hex (which is short for hexadecimal) color codes are found in two places in Excel.

  • Color picker – Excel 2021 and Excel 365
  • VBA – All versions of Excel

Since the introduction of hex codes in the color picker, there is now native conversion between RGB, Hex and HSL color codes.

Hex color codes are similar to RGB as they also use 256 shades for each individual color. The critical difference is that the hex system represents the numbers from 0 to 255 using just two characters. This is possible because hex uses Base-16.

We generally use Base-10 in everyday life, which means that we have 10 digits (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) available. As an example, the number 14 is created by using the formula (1 x base) + 4. The base is 10, so the result is calculated as (1 x 10) + 4, which equals 14.

For Base-16, there are 16 digits; however, as we don’t have enough number characters we use A, B, C, D, E and F to represent the numbers from 10 through 15.

As an example, the hex number AB equals 171.

  • A = 10
  • B = 11.
  • The calculation is (A x base) + B = (10 x 16) + 11 = 171

In hex, the lowest value is zero and the highest value is F (which is equal to 15). Therefore, there are 16 possible individual digits. This means that from two digits we can create 256 shades (16 x 16 = 256), which is the same as RGB. Therefore, hex also has the same 16,777,216 combinations as RGB and long.

Hex codes are presented in same order to RGB, so if the hex color code is #467321 the first two characters represent red, the middle two characters represent green and the last two are blue.

Using the #467321 hex code as an example, the conversion to RGB would be:

  • Red: Hex value of 46 calculates as (4 * 16) + 6 = 70
  • Green: Hex value of 73 calculates as (7 * 16) + 3 = 115
  • Blue: Hex value of 21 calculates as (2 * 16) + 1 = 33

The hex codes are used within the VBA properties to define color.

The color code in the screenshot above is: &H00467321&. However, there is a very subtle difference when using the VBA code; the hex code needs to be reversed. The first two characters represent blue, the middle two characters represent green and last two are blue.

Normally, blue would be #0000FF, but for the VBA property the code would be: &H00FF0000&

  • & = Start character
  • H = Hex code
  • 00 = Tells VBA to use a custom color
  • FF0000 = the Hex color code with the RGB reversed
  • & = End character

Another common color code system is CMYK. It is used primarily for printing, as it determines the amount of Cyan, Magenta, Yellow and blacK ink used in overlapping printed dots.

While Excel does not use CMYK, it is a common method, so I have included it within the scope of this post.

Finally, to complete the spectrum of color code systems, there is HSV. It is similar to HSL, but it uses Hue, Saturation, and Value as measures. This is not just HSL under a different name. While Hue is the same under both systems, Saturation and Value both calculate as different values.

Excel does not support HSV, but is included below because it is a common method.

User Defined Functions for color conversion

In the section above, I’ve tried to explain how each method defines colors, but converting between them is a different matter entirely, and is much harder. Thankfully, we can let Excel do the work for us. Below are the UDF’s to convert between the various methods.

REMEMBER! – To use VBA functions, the code must be included in a standard VBA code module.

RGB, hex and long are all based on whole numbers, so they should perfectly convert between each other. CMYK and HSL involve decimal places and percentages and therefore could create small differences in their conversions.

Convert from RGB to hex

The following UDF calculates the hex value based on the RGB color codes.

How to use the function:

The function contains 3 arguments, values between 0 and 255 for each individual Red, Green, or Blue value.

Convert from hex to RGB

The UDF below provides the Red, Green, or Blue value based on the hex color.

How to use the function:

The function contains 2 arguments;

  1. the hex code
  2. the letter R, G or B, to represent the color to be returned

Convert from RGB to long

This UDF provides the long value based on the RGB color codes.

How to use the function:

The function contains 3 arguments, values between 0 and 255 for each individual Red, Green, or Blue value.

Convert from long to RGB

To convert from RGB to the long color code, use the following UDF.

How to use the function:

The function contains 2 arguments;

  1. the long code
  2. the letter R, G, or B, depending on which color we want to return.

Convert from long to hex

The following UDF provides the hex code based on the long color code.

How to use the function:

The function has only one argument, which is the long color code.

Convert from hex to long

The UDF below converts the hex code into the long color code.

How to use the function:

The function has only one argument, which is the hex code.

Convert from RGB to HSL

The UDF below will return the degree of Hue, % of Saturation, or % of Luminance based on the RGB color codes.

How to use the function:

The function contains 4 arguments. The R, G and B values, then the letter H, S, or L, depending on the value to be returned by the function.

The calculation for converting to HSL is based on the calculation from here: http://www.niwa.nu/2013/05/math-behind-colorspace-conversions-rgb-hsl/

Convert from HSL to RGB

The following UDF calculates the RGB values based on the degree of Hue, % of Saturation and % of Luminance

How to use the function:

The function contains 4 arguments. The Hue degree, Saturation %, and Luminance %, plus the letter R, G or B depending on the value to be returned

The calculation for converting from HSL is based on the calculation from here: http://www.niwa.nu/2013/05/math-behind-colorspace-conversions-rgb-hsl/

Convert from RGB to CMYK

The following UDF provides the % value for Cyan, Magenta, Yellow, or Black based on the RGB color codes.

How to use the function:

The function requires 4 arguments. The R, G and B values, along with the letter C, M, Y or K, depending on the value to be returned.

The calculation for converting to CMYK is based on the calculation from here: https://www.easycalculation.com/colorconverter/cmyk-rgb-color-convertor.php

Convert from CMYK to RGB

To get the C, M, Y, or K percentages from RGB use the UDF below.

How to use the function:

The function requires 5 arguments. The Cyan, Magenta, Yellow and Black percentages, plus the letter R, G or B, depending on the value to be returned.

Convert from RGB to HSV

The UDF below will return the degree of Hue, % of Saturation, or % of Value based on the RGB color codes.

The calculation for converting to HSV from RGB based on the calculation from here: https://www.calculatorology.com/hsv-to-rgb-conversion/

Convert from HSV to RGB

The following UDF calculates the RGB values based on the degree of Hue, Saturation % and Value % of the HSV method.

The calculation for converting to HSV from RGB based on the calculation from here: https://www.codespeedy.com/hsv-to-rgb-in-cpp/

Color conversion add-in

Using these conversion functions, I have created an Excel add-in that will quickly switch between the different color codes.

The add-in is included within the downloads at the top of the post. To install the add-in, follow the PDF instructions included in the download, or follow the instructions in this post.

Once installed, the EOTG menu will include an icon called Converter in the Color Codes group.

Click the button to open the tool. When entering values into any of the boxes, the other boxes will automatically display the converted codes.

Conclusion

I hope this post provides you with all the color conversions that you need. If you want to convert between two methods that I have not covered above (for example, hex to HSL has not been included), convert from the source code to RGB, then from RGB to the target mode.

Related posts:

About the author

Hey, I’m Mark, and I run Excel Off The Grid.

My parents tell me that at the age of 7 I declared I was going to become a qualified accountant. I was either psychic or had no imagination, as that is exactly what happened. However, it wasn’t until I was 35 that my journey really began.

In 2015, I started a new job, for which I was regularly working after 10pm. As a result, I rarely saw my children during the week. So, I started searching for the secrets to automating Excel. I discovered that by building a small number of simple tools, I could combine them together in different ways to automate nearly all my regular tasks. This meant I could work less hours (and I got pay raises!). Today, I teach these techniques to other professionals in our training program so they too can spend less time at work (and more time with their children and doing the things they love).

Do you need help adapting this post to your needs?

I’m guessing the examples in this post don’t exactly match your situation. We all use Excel differently, so it’s impossible to write a post that will meet everybody’s needs. By taking the time to understand the techniques and principles in this post (and elsewhere on this site), you should be able to adapt it to your needs.

But, if you’re still struggling you should:

  1. Read other blogs, or watch YouTube videos on the same topic. You will benefit much more by discovering your own solutions.
  2. Ask the ‘Excel Ninja’ in your office. It’s amazing what things other people know.
  3. Ask a question in a forum like Mr Excel, or the Microsoft Answers Community. Remember, the people on these forums are generally giving their time for free. So take care to craft your question, make sure it’s clear and concise. List all the things you’ve tried, and provide screenshots, code segments and example workbooks.
  4. Use Excel Rescue, who are my consultancy partner. They help by providing solutions to smaller Excel problems.

What next?
Don’t go yet, there is plenty more to learn on Excel Off The Grid. Check out the latest posts:

Источник

I’ve googled the topic and searched on Super User for a preëxistent answer, and yet I cannot for the life of me figure this out.

What I want to do is simple: just assign a particular colour in the colour palette for cell fill. But I want to do so by using the Hex value of said colour, and it’s only giving me the option to enter the RGB or HSL value.

However, this is such a basic option when it comes to colour input modes when it comes to software, I just find it ridiculously hard to believe that no option even exists.

Is this possible—at all possible—in Excel 2013?


Not sure if they’re needed, but just in case, here’s my comp’s specs:

  • Make & Model: HP Compaq dc5700 SFF Base
  • Operating System: Windows 7 Professional SP1 x64

asked Jul 23, 2015 at 16:54

SarahofGaia's user avatar

2

How can I enter Hex colour values in Excel?

This is not possible. Excel uses a version of the Color Dialog Box that only allows generation of custom colours using RGS or HLS.

However you can use an online color converter, such as Colorizer
to convert from Hex values to RGB and HSL and then use the results in Excel.

enter image description here


What is Colorizer?

Color picker, calculator and generator with high precision and contrast test. Converts also RGB, HEX, HSL, HSV/HSB, CMYK and CIE-LAB colors and lots of other formats. In the Hex-field, you can write a known color name, too.


The Color Dialog Box

The Windows SDK provides a «standard» Color Dialog Box to choose colours. Many programs are built to use this.

enter image description here

Displays a modal dialog box that allows the user to choose a specific color value. The user can choose a color from either a set of basic or custom color palettes. Alternatively, the user can generate a color value by modifying the RGB or hue, saturation, luminosity (HSL) color values of the dialog box user interface. The Color dialog box returns the RGB value of the color selected by the user.

Some graphics programs (GIMP for example) that need a more sophisticated colour choosing mechanism provide their own custom dialog.


Further reading

  • Color Dialog Box

answered Jul 23, 2015 at 17:10

DavidPostill's user avatar

DavidPostillDavidPostill

150k77 gold badges348 silver badges386 bronze badges

7

Hex is just RGB in hexadecimal. Split the hex up into 2 digit chunks and convert using a calculator from hex to decimal. In fact you could probably do that in Excel!

So 00FF00 is R=0 G=255 B=0 (FF=255)

If you’re on windows, you can also use Calc.exe in programmer mode to convert the hex.

You could also use some VBA to take a cell value and convert and alter the cell colour (I imagine).

Olivier Pons's user avatar

Olivier Pons

8842 gold badges11 silver badges27 bronze badges

answered May 7, 2020 at 10:44

Andrew's user avatar

  1. Click on the cell or cells you wish to color.
  2. Click on the paint bucket to fill in a color.
  3. Select «More Colors.»
  4. Select «Custom.»
  5. At the bottom of your the the custom panel is «Hex:» Enter Hex code here.

answered Mar 2, 2021 at 21:58

Gordon Irving's user avatar


Colors

Colors are specified by selection or by using Hexadecimal and RGB codes.


Theme and Standard Colors

Excel has a set of themes and standard colors available for use. You select a color by clicking it:

The «More Colors» option allows you to select custom colors by entering a RGB or HEX code.


Hexadecimal Colors

Excel supports Hexadecimal color values

A hexadecimal color is specified with: #RRGGBB.

RR (red), GG (green) and BB (blue) are hexadecimal integers between 00 and FF specifying the intensity of the color.

For example, #0000FF is displayed as blue, because the blue component is set to its highest value (FF) and the others are set to 00.


RGB Colors

Excel supports RGB color values.

An RGB color value is specified with: rgb( RED , GREEN , BLUE ).

Each parameter defines the intensity of the color as an integer between 0 and 255.

For example, rgb(0,0,255) is rendered as blue, because the blue parameter is set to its highest value (255) and the others are set to 0.



Applying colors

Colors can be applied to cells, text and borders.

Colors are applied to cells by using the «Fill color» function.

How to apply colors to cells:

  1. Select color
  2. Select range
  3. Click the Fill Color button

The «Fill color» button remembers the color you used the last time.

Color options are explored by clicking on the arrow-down icon (),
next to the Fill color command:

The option allows selection of theme colors, standard colors or use of HEX or RGB codes by clicking on the More Colors option:

Colors are made from red, green, blue and are universal. Entering a color in one way will give you the code in the other. For example if you enter a HEX code, it will give you the RGB code for the same color.

Let’s try some examples.

Starting with theme and standard colors:

Great!

Try to apply the following colors:

  • Theme color blue (accent 5) to A3:F3.
  • Theme color green (accent 6) and A5:F5.

Did you make it?

Let’s apply colors using HEX and RGB codes.

Apply HEX code #ffcb05 to A7:F7:

Step by step:

  1. Select A7:F7
  2. Open color options
  3. Click More colors
  4. Insert #ffcb05 in the HEX input field
  5. Hit enter

Notice that applying the HEX code gives the RGB code for the same color, and shows where that color is positioned on the color map.

Apply RGB code 60, 90, 166 to A9:F9

Step by step:

  • Select A9:F9
  • Open color options
  • Click More colors
  • Insert 60, 90, 166 in the RGB input field
  • Hit enter

Notice that entering the RGB code also gives the HEX code and shows you where the color is positioned on the color map.

Well done! You have successfully applied colors using the standard, theme, HEX and RGB codes.


Наименования цветов стандартной палитры Excel из 56 оттенков на русском и английском языках. Соответствие цветов индексам VBA и их RGB и HEX коды.

Стандартная палитра из 56 цветов — это ограниченная палитра оттенков, которая существовала до версии Excel 2007 года, но продолжает использоваться до сих пор.

За ограниченную палитру в VBA Excel отвечает свойство ColorIndex, которое используется для записи и чтения:

Sub Primer()

    Range(«A1»).Interior.ColorIndex = 10

    MsgBox Range(«A1»).Interior.ColorIndex

End Sub

Свойство ColorIndex принимает и возвращает значения от 1 до 56.

Наименования 56 цветов палитры

Наименования 56 цветов стандартной ограниченной палитры Excel на русском и английском языках:

Индекс Наименование
по-русски
Наименование по-английски Оттенок
1 Черный Black
2 Белый White
3 Красный Red
4 Лайм Lime
5 Синий Blue
6 Желтый Yellow
7 Фуксия* Fuchsia*
8 Цвет морской волны Aqua
9 Темно-бордовый Maroon
10 Зеленый Green
11 Темно-синий Navy blue
12 Оливковый Olive
13 Пурпурный Purple
14 Бирюзовый Teal
15 Серебряный Silver
16 Серый Gray
17 Светло-пурпурно-синий Light purple blue
18 Розовато-лиловый Mauve
19 Бледно-желто-зеленый Pale yellow green
20 Бледно-голубой Pale blue
21 Сливовый Plum
22 Лососевый Salmon
23 Темно-сине-голубой Light navy blue
24 Барвинок Periwinkle
25 Темно-синий Navy blue
26 Фуксия* Fuchsia*
27 Желтый Yellow
28 Цвет морской волны Aqua
29 Пурпурный Purple
30 Коричнево-малиновый Maroon
31 Сине-зеленый Teal
32 Синий Blue
33 Небесно-голубой Vivid sky blue
34 Бледно-голубой Pale blue
35 Бледно-зеленый Pale green
36 Светло-желтый Light yellow
37 Сине-голубой Shade of blue
38 Бледно-пурпурно-розовый Pale magenta pink
39 Светло-сиреневый Light lilac
40 Оранжево-персиковый Peach-orange
41 Светло-синий Light blue
42 Светло-бирюзовый Light turquoise
43 Желто-зеленый Yellow green
44 Желтый мандарин Tangerine yellow
45 Сигнальный оранжевый Safety orange
46 Оранжевый Orange
47 Темно-сине-серый Dark blue gray
48 Светло-серый Light gray
49 Полуночно-синий Midnight blue
50 Зеленая трава Green grass
51 Темно-зеленый Dark green
52 Темно-коричневый Dark brown
53 Темно-красный Dark red
54 Розовато-лиловый Mauve
55 Синий пигмент Blue pigment
56 Темный уголь Dark charcoal

* Вместо термина Фуксия (Fuchsia) можно использовать термин Маджента (Magenta), так как в RGB-модели Фуксия и Маджента являются одним и тем же цветом.

Обратите внимание, что в стандартной палитре Excel из 56 цветов есть повторяющиеся оттенки. Наименования цветов (по их HEX-кодам) подобраны, главным образом, по статьям, опубликованным в Википедии.

RGB и HEX коды оттенков палитры

RGB и HEX коды оттенков 56-цветной палитры Excel:

Индекс Код HEX Код RGB Оттенок
1 #000000 RGB(0, 0, 0)
2 #ffffff RGB(255, 255, 255)
3 #ff0000 RGB(255, 0, 0)
4 #00ff00 RGB(0, 255, 0)
5 #0000ff RGB(0, 0, 255)
6 #ffff00 RGB(255, 255, 0)
7 #ff00ff RGB(255, 0, 255)
8 #00ffff RGB(0, 255, 255)
9 #800000 RGB(128, 0, 0)
10 #008000 RGB(0, 128, 0)
11 #000080 RGB(0, 0, 128)
12 #808000 RGB(128, 128, 0)
13 #800080 RGB(128, 0, 128)
14 #008080 RGB(0, 128, 128)
15 #c0c0c0 RGB(192, 192, 192)
16 #808080 RGB(128, 128, 128)
17 #9999ff RGB(153, 153, 255)
18 #993366 RGB(153, 51, 102)
19 #ffffcc RGB(255, 255, 204)
20 #ccffff RGB(204, 255, 255)
21 #660066 RGB(102, 0, 102)
22 #ff8080 RGB(255, 128, 128)
23 #0066cc RGB(0, 102, 204)
24 #ccccff RGB(204, 204, 255)
25 #000080 RGB(0, 0, 128)
26 #ff00ff RGB(255, 0, 255)
27 #ffff00 RGB(255, 255, 0)
28 #00ffff RGB(0, 255, 255)
29 #800080 RGB(128, 0, 128)
30 #800000 RGB(128, 0, 0)
31 #008080 RGB(0, 128, 128)
32 #0000ff RGB(0, 0, 255)
33 #00ccff RGB(0, 204, 255)
34 #ccffff RGB(204, 255, 255)
35 #ccffcc RGB(204, 255, 204)
36 #ffff99 RGB(255, 255, 153)
37 #99ccff RGB(153, 204, 255)
38 #ff99cc RGB(255, 153, 204)
39 #cc99ff RGB(204, 153, 255)
40 #ffcc99 RGB(255, 204, 153)
41 #3366ff RGB(51, 102, 255)
42 #33cccc RGB(51, 204, 204)
43 #99cc00 RGB(153, 204, 0)
44 #ffcc00 RGB(255, 204, 0)
45 #ff9900 RGB(255, 153, 0)
46 #ff6600 RGB(255, 102, 0)
47 #666699 RGB(102, 102, 153)
48 #969696 RGB(150, 150, 150)
49 #003366 RGB(0, 51, 102)
50 #339966 RGB(51, 153, 102)
51 #003300 RGB(0, 51, 0)
52 #333300 RGB(51, 51, 0)
53 #993300 RGB(153, 51, 0)
54 #993366 RGB(153, 51, 102)
55 #333399 RGB(51, 51, 153)
56 #333333 RGB(51, 51, 51)

RGB-коды можно использовать в VBA Excel наряду с индексами цветов стандартной палитры, а HEX-коды — в HTML.

Процент черного в оттенках серого

Процентное соотношение черного цвета в оттенках серого:

Индекс Наименование Процент черного Оттенок
1 Черный 100%
2 Белый 0%
15 Серебряный 25%
16 Серый 50%
48 Светло-серый 40%
56 Темный уголь 80%

Вывод 56-цветной палитры на лист

Вывод на рабочий лист Excel 56-цветной палитры с помощью кода VBA:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

‘Функция, преобразующая десятичный код цвета в аргументы RGB

Function DecToRGB(ByVal ColDec As Long) As String

Dim r As Long

Dim g As Long

Dim b As Long

    r = (ColDec And &HFF&) 256 ^ 0

    g = (ColDec And &HFF00&) 256 ^ 1

    b = ColDec 256 ^ 2

    DecToRGB = CStr(r) & «, « & CStr(g) & «, « & CStr(b)

End Function

‘Вывод 56-цветной палитры на активный лист

Sub Color56()

Dim i As Integer

    For i = 1 To 56

        Cells(i, 1) = i

        Cells(i, 2).Interior.ColorIndex = i

        Cells(i, 3).Value = «RGB(« & DecToRGB(Cells(i, 2).Interior.Color) & «)»

    Next

End Sub

Процедура Color56 записывает в ячейку первого столбца индекс цвета, ячейке второго столбца присваивается соответствующая индексу заливка, в ячейку третьего столбца записывается RGB-код соответствующего индексу цвета.


New and very useful feature for artists and designers. Specify accurate colour value using HEX code instead of RGB or HSL. What difference? Well, HEX codes are most commonly used. RGB or HSL require you to put three values. HEX is ONE value. Hex color in Office apps: Word, Excel, PowerPoint, Outlook, OneNote, Access, Project, Publisher, and Visio.

Hex color in Office

By the way, this colour shown here – #0F4C81 is special. It is called Classic Blue and it is the Pantone colour of the year 2020.

Why is hex color in Office so important?

In today’s world, design happens more on web than on desktop applications. In the design world, hex color has always been popular. Hex color in Office was a long standing request.

Otherwise, we had only RGB and HSL as options. This required you to choose a dropdown and add three numbers – making it cumbersome.

Where do we get the Hex values from?

Within Office, use the Eyedropper tool which is available in every colour related dropdown in PowerPoint. View my PowerPoint Colour Picker video learn how to choose colour from anywhere on the screen (not just the slide).

Well, there are lots of color management and palette creation tools available. All of them provide hex colors. The most popular is Adobe Color.

Here all values are shown in Hex. If needed, you can also download them as XML, JSON, CSS or more.

Web design and programming almost exclusively use Hex colors.

Where does Hex color in Office work

Although most people started using Hex color in Office for PowerPoint, it is not limited to it. It works across Word, Excel, PowerPoint, Outlook, Publisher, Visio, Project, Access, OneNote on Windows Desktop and Mac as well.

Try it out and see if it works.

If you do not see the hex option, update the version of Office. You may have to request your IT team to update it for you. In most organizations, the update frequency is six-monthly. It may make more sense to make it monthly because nowadays, new features are added almost every week!

Create appealing colour palettes

There are millions of colours to choose from. But that does not mean we use them randomly. Choosing the most appropriate set of colour is an art form. Don’t worry. Create matching colour palettes using tools like Adobe Color, Coolers, or Palleton.

Microsoft Office Blog Banner

A new Input Field is now available for Microsoft Office Applications in the Colors dialog box for HEX Color Values. This way we will not spend any more time converting HEX Color Values into RGB Values. This new feature is available in Word, Excel, PowerPoint, Outlook, Publisher, Visio, Project, Access, and OneNote.

How To Set Colors Based on Hex Codes in Microsoft Office Applications

What is a Hex Value for Color? A color hex code describes the composition of a certain color in a specific color space, usually RGB. In the case of RGB, the first value pair refers to red, the second to green and the third to blue, with decimal values ranging from 0 to 255, or in hexadecimal 0 to FF (#RRGGBB).

What are RGB Values? A color’s RGB value indicates its red, green, and blue intensity. Each intensity value is on a scale of 0 to 255, or in hexadecimal from 00 to FF. RGB values are used in HTML, XHTML, CSS, and other web standards.

In the next image I have Microsoft Word running and then from the Home tab of the ribbon and in the area named Font we select the Font Color button which is located at the bottom right corner of the Font area, and once the Color Palette appears from the bottom we select the command More Colors as shown below.

How To Set Colors Based on Hex Codes in Microsoft Office Applications?

In the next image I have Microsoft Excel running and then from the Home tab of the ribbon and in the area named Font we select the Font Color button which is located at the bottom right corner of the Font area, and once the Color Palette appears from the bottom we select the command More Colors as shown below.

How To Set Colors Based on Hex Codes in Microsoft Office Applications?

In the next image I have Microsoft PowerPoint running and then from the Home tab of the ribbon and in the area named Font we select the Font Color button which is located at the bottom right corner of the Font area, and once the Color Palette appears from the bottom we select the command More Colors as shown below.

How To Set Colors Based on Hex Codes in Microsoft Office Applications?

In the next image I have Microsoft Outlook running and I have created a New Mail Message and then from the Home tab of the ribbon and in the area named Font we select the Font Color button which is located at the bottom right corner of the Font area, and once the Color Palette appears from the bottom we select the command More Colors as shown below.

How To Set Colors Based on Hex Codes in Microsoft Office Applications?

Once we select the More Colors command, the Colors dialog box appears where we select the Custom tab as shown below. All that is left to do is type the Hex Color Value in the Hex box. For example we can type in the Hex Color Value #CC00CC, which is Red 204 Green None and Blue 204.

How To Set Colors Based on Hex Codes in Microsoft Office Applications?

Now the procedure of Converting Hex Color to RGB Values belong in the past. The procedure is quite simple as described above.

Below you can check out the video describing How To Set Colors Based on Hex Codes in Microsoft Office Applications?

Don’t Forget To Subscribe To My YouTube Channel.

YouTube Channel

Like this post? Please share to your friends:
  • Hetman word recovery это
  • Hetman word recovery скачать бесплатно c ключом на русском
  • Hetman word recovery repack
  • Hetman word recovery key
  • Hetman excel recovery key