Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-01-2025, 01:12 PM
herosz herosz is offline font color by percentage Windows 10 font color by percentage Office 2021
Advanced Beginner
font color by percentage
 
Join Date: Oct 2019
Posts: 76
herosz is on a distinguished road
Default font color by percentage

Hi!
I don't know from where I got this, but its color is Gray-40% so is it possible to add color by percentage? How can I modify it e.g. to 60% because I can't do it at all( I tried to modify the font color from the ribbon or from style but the percentage only has lighter or darker option).



Lorem_gray.docx
Reply With Quote
  #2  
Old 03-01-2025, 02:56 PM
Italophile Italophile is offline font color by percentage Windows 11 font color by percentage Office 2021
Expert
 
Join Date: Mar 2022
Posts: 560
Italophile is just really niceItalophile is just really niceItalophile is just really niceItalophile is just really nice
Default

Gray 40% = White 40% darker = Black 60% lighter

RGB has 256 values - from black 0,0,0 to white 255,255,255

Do the math.
Reply With Quote
  #3  
Old 03-01-2025, 04:18 PM
herosz herosz is offline font color by percentage Windows 10 font color by percentage Office 2021
Advanced Beginner
font color by percentage
 
Join Date: Oct 2019
Posts: 76
herosz is on a distinguished road
Default

I understand this, but style modify or reveal style shows Font color: Gray-40% ,doesn't show any RGB or Hex value, so I guess it wasn't inserted as RGB or Hex.
My question is how was it inserted and how can I modify it without math just using a percentage like Gray-60%.
Reply With Quote
  #4  
Old 03-01-2025, 05:51 PM
Italophile Italophile is offline font color by percentage Windows 11 font color by percentage Office 2021
Expert
 
Join Date: Mar 2022
Posts: 560
Italophile is just really niceItalophile is just really niceItalophile is just really niceItalophile is just really nice
Default

Quote:
Originally Posted by herosz View Post
I understand this, but style modify or reveal style shows Font color: Gray-40% ,doesn't show any RGB or Hex value, so I guess it wasn't inserted as RGB or Hex.
My question is how was it inserted and how can I modify it without math just using a percentage like Gray-60%.
Gray 40% is merely a standard color descriptor, just like red, yellow, or dark green.

Given that the theme colors do not offer a 40% option, and it is not possible to specify colors by percentage, it should be obvious to you that the color must have been entered as RGB values.

So, do the math and enter the values.
Reply With Quote
  #5  
Old 03-01-2025, 06:02 PM
Charles Kenyon Charles Kenyon is offline font color by percentage Windows 11 font color by percentage Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,569
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Could this be one of the theme colors which has gradations between black and white.


The name is the name of a character style. This is not one of the built-in character styles but may have come from another template or document.


Take a look at the built-in style Placeholder Text.
Reply With Quote
  #6  
Old 03-01-2025, 06:35 PM
Charles Kenyon Charles Kenyon is offline font color by percentage Windows 11 font color by percentage Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,569
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Those names sounded familiar. So I looked in Word 97 and Word 2003, which did not use Theme colors but only standard colors.
They have gradations of gray.
00 deleteme 11.png 00 deleteme 8.png

There are standard shade of gray colors built into Word like wdColorGray50. This can be used in vba using something along the lines of:
Code:
Sub ColorGray50()
    Selection.range.Font.ColorIndex = wdGray50
End Sub
While there are standard colors for some shades of gray, there are not for actual hues.
My guess is that someone created a character style for that shade. Something similar could be done with the Theme colors. Note, though, if someone changes the Theme, the color will change.

You can do something similar to standard colors using the full RGB more colors.

Working with Theme colors, as Italophile mentioned, it is in terms of lighter and darker for the base Theme color. You can approximate what you want, but again, as a Theme color, if the Theme is changed, your color likely will also change.
I expect that it is possible to render the Theme color as RGB, but do not know how I would do this.
[Quick] Style Sets and Word Themes in Microsoft Word
Reply With Quote
  #7  
Old 03-02-2025, 12:25 AM
Italophile Italophile is offline font color by percentage Windows 11 font color by percentage Office 2021
Expert
 
Join Date: Mar 2022
Posts: 560
Italophile is just really niceItalophile is just really niceItalophile is just really niceItalophile is just really nice
Default

Quote:
Originally Posted by Charles Kenyon View Post
You can do something similar to standard colors using the full RGB more colors.
Those standard colors are RGB colors. The only way of entering colors prior to Office 2007 was to use RGB, or HSL. The ColorIndex was merely a ‘shortcut’ that entered RGB values for a selection of predetermined colors.
Reply With Quote
  #8  
Old 03-02-2025, 12:32 AM
Charles Kenyon Charles Kenyon is offline font color by percentage Windows 11 font color by percentage Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,569
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Quote:
Originally Posted by Italophile View Post
Those standard colors are RGB colors. The only way of entering colors prior to Office 2007 was to use RGB, or HSL. The ColorIndex was merely a ‘shortcut’ that entered RGB values for a selection of predetermined colors.
The Standard Colors are a small subset of available RGB values. They are assigned constants in vba. Or, at least, that is my understanding and the way I am using Standard Colors as a term.
Variants using More Colors could certainly be assigned to character styles appropriately named. The distinction I am trying to make inartfully is that colors obtained that way (More Colors) will not vary with the Theme settings. Ones simply picked from the Theme color variants will appear different when a different Theme is used.
Reply With Quote
  #9  
Old 03-02-2025, 12:36 AM
Italophile Italophile is offline font color by percentage Windows 11 font color by percentage Office 2021
Expert
 
Join Date: Mar 2022
Posts: 560
Italophile is just really niceItalophile is just really niceItalophile is just really niceItalophile is just really nice
Default

Quote:
Originally Posted by Charles Kenyon View Post
The Standard Colors are a small subset of available RGB values. They are assigned constants in vba. Or, at least, that is my understanding and the way I am using Standard Colors as a term.
Variants using More Colors could certainly be assigned to character styles appropriately named. The distinction I am trying to make inartfully is that colors obtained that way (More Colors) will not vary with the Theme settings. Ones simply picked from the Theme color variants will appear different when a different Theme is used.
Those VBA constants are the same as the standard color palette available in Office prior to 2007.
Reply With Quote
  #10  
Old 03-02-2025, 12:41 AM
Italophile Italophile is offline font color by percentage Windows 11 font color by percentage Office 2021
Expert
 
Join Date: Mar 2022
Posts: 560
Italophile is just really niceItalophile is just really niceItalophile is just really niceItalophile is just really nice
Default

Quote:
Originally Posted by Charles Kenyon View Post
I expect that it is possible to render the Theme color as RGB, but do not know how I would do this.
That is very simple to do. Find something formatted with a theme color and go to modify the color in the UI. Click on "More Colors" and switch to the RGB tab of the dialog and you will find the RGB value of the item is already filled in. OK out of the dialog and the item is no longer formatted with a theme color, but with its corresponding RGB value.
Reply With Quote
  #11  
Old 03-02-2025, 02:58 PM
herosz herosz is offline font color by percentage Windows 10 font color by percentage Office 2021
Advanced Beginner
font color by percentage
 
Join Date: Oct 2019
Posts: 76
herosz is on a distinguished road
Default

Quote:
Originally Posted by Italophile View Post


Gray 40% is merely a standard color descriptor, just like red, yellow, or dark green.
Given that the theme colors do not offer a 40% option, and it is not possible to specify colors by percentage, it should be obvious to you that the color must have been entered as RGB values.

So, do the math and enter the values.

Ok, I found this site gray40 | RGB to HEX and HEX to RGB so I got rid of the math anyway I was just interested in the possibility of color in percentages and now is everything clear, thanks.
Reply With Quote
  #12  
Old 03-02-2025, 11:43 PM
macropod's Avatar
macropod macropod is online now font color by percentage Windows 10 font color by percentage Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,497
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You can get the full list of the built-in Word colors, their descriptions and RGB values at: WdColor Enum (Microsoft.Office.Interop.Word) | Microsoft Learn
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
font color by percentage VBA change font color to background color donaldadams1951 Word VBA 6 05-31-2018 04:36 PM
Advanced Font Color Manipulation In Word: Inserting another color than the surrounding text stuartg Word 1 02-20-2017 12:38 AM
font color by percentage Remove white text background (keeping the font color and page color intact cc3125 Word 1 10-26-2015 06:44 PM
Font Color Question//.Replacement.Font.Color = 12611584 rsrasc Word VBA 3 09-05-2015 09:03 PM
Make a certain font face and font color as default in a document. Singh_Edm Word VBA 2 09-13-2014 08:47 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:52 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft