Solved System color theory (1 Viewer)

snow-raven

Registered User.
Local time
Today, 00:47
Joined
Apr 12, 2018
Messages
48
I wanted to view & develop my longterm db in dark mode to save my poor, abused eyes, but not all of my team feels that way. I carefully changed all of my colors to System colors, thinking it would match the user's system. However, now that I've deployed my latest beta, they all have dark mode configuration... Am I misunderstanding how this works?
1645813073679.png
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 03:47
Joined
Feb 19, 2002
Messages
43,257
Your best option is to use the themes to color your database. Then on your own computer, set the dark mode.
 

snow-raven

Registered User.
Local time
Today, 00:47
Joined
Apr 12, 2018
Messages
48
Your best option is to use the themes to color your database. Then on your own computer, set the dark mode.
Does that change the form colors to dark mode? They stayed white before, but I can't say I was careful about how I chose them until I tried this.
 

snow-raven

Registered User.
Local time
Today, 00:47
Joined
Apr 12, 2018
Messages
48
As far as I can tell, no... and the standard Windows dark mode is awful in Access. Can't read my property sheets at all now. Will have to go hack the registry again...
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 03:47
Joined
Feb 19, 2002
Messages
43,257
No. The Windows setting does not change anything on the forms controlled by the theme
BlackBackground.JPG
But if I want to tone down the white, I use a gray background on the forms.

MS keeps making stupid changes just for the sake of change and the gray they are now using for the text in the Access interface is IMPOSSIBLE for me to read so I hear you. I hate the black but it is the only way I can read the nav pain or the properties sheet without putting my nose right up to the monitor. You'd think with all the money they spend on this, they would understand what the problem is and the problem is CONTRAST so when you make your text such a light gray with such an insubstantial font, people with the slightest sight issues can't function. I can sit back in my chair and work with the other office apps because I can change the text of all the data in a Word or Excel document and unless I am writing VBA in one of those environments, I don't care about the other aspects of the GUI bur Access is making me really unhappy these days.
 
Last edited:

snow-raven

Registered User.
Local time
Today, 00:47
Joined
Apr 12, 2018
Messages
48
No. The Windows setting does not change anything on the forms controlled by the theme View attachment 98605 But if I want to tone down the white, I use a gray background on the forms.
Yeah, me too. But my primary user complained. I guess they'll have to hire me to create user profiles. After I fix my Windows system themes again...
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 03:47
Joined
May 21, 2018
Messages
8,527
I am a man so I only have use for about 5 colors, So no expert. but this is a good thread on colors and color theory in access.
Who knew?
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 03:47
Joined
Feb 19, 2002
Messages
43,257
I hope you are not trying to make the color customizable for the users. Just come up with something with muted colors and sufficient contrast so that most people will not have trouble reading the text.
 

isladogs

MVP / VIP
Local time
Today, 08:47
Joined
Jan 14, 2017
Messages
18,212
Peter Cole has a theme maker app which may solve your problem.
I will alert him to this thread
 

petertheme

New member
Local time
Today, 08:47
Joined
Feb 25, 2022
Messages
12
Yeah, me too. But my primary user complained. I guess they'll have to hire me to create user profiles. After I fix my Windows system themes again...
To cause confusion, Microsoft chose to call 2 completely different things "Office Themes".
The first is the colour scheme for the Office applications, it is set in the Account section of Access and has White, Black Colorful etc. Changing that theme changes all Office applications.
The other "Office Themes" are what changes the colours on forms and controls in Access and headings and fill colors in Word and other settings in Excel and Powerpoint.

To change the Theme open a form in design mode and open the form design tab, at the left you will see the Themes group. On the left is the Theme Gallery if you open it you will see the themes that are available on your system. If you move through the gallery options the colors should change on the form. If you have Office 2013 or later you will have 8 or 9 themes to choose from. If you previously had 2010 you may have 30 + other options. If you click on one of the themes the colors will change throughout the database. If no colors change when you select a different theme then you have manually set the colors to specific values. Assuming things change you can revert to the original scheme by choosing "Office" in the theme gallery. Access remembers the last used theme when it closes the database and will use that when it re-opens.

A theme has 12 base colours and 2 fonts. For every base color there are 100 lighter variations and 100 darker, so plenty to choose from.
If you look at the properties of a control you will see something like "Background 1" or "Accent 1, Lighter 25%".
To a color property click the ... and Theme Colors will be shown at the top.

New Themes with different colours and fonts can be created using the ribbon or my free ThemeMker.

If you have set the colors manually they will need to be reset to Themed values. That can be achieved using my ApplyStyle add-in.
Tomorrow I will post a link for ThemeMaker download and a video showing the Add-in.

I am the Peter Cole that isladogs mentioned.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 00:47
Joined
Oct 29, 2018
Messages
21,467
To cause confusion, Microsoft chose to call 2 completely different things "Office Themes".
The first is the colour scheme for the Office applications, it is set in the Account section of Access and has White, Black Colorful etc. Changing that theme changes all Office applications.
The other "Office Themes" are what changes the colours on forms and controls in Access and headings and fill colors in Word and other settings in Excel and Powerpoint.

To change the Theme open a form in design mode and open the form design tab, at the left you will see the Themes group. On the left is the Theme Gallery if you open it you will see the themes that are available on your system. If you move through the gallery options the colors should change on the form. If you have Office 2013 or later you will have 8 or 9 themes to choose from. If you previously had 2010 you may have 30 + other options. If you click on one of the themes the colors will change throughout the database. If no colors change when you select a different theme then you have manually set the colors to specific values. Assuming things change you can revert to the original scheme by choosing "Office" in the theme gallery. Access remembers the last used theme when it closes the database and will use that when it re-opens.

A theme has 12 base colours and 2 fonts. For every base color there are 100 lighter variations and 100 darker, so plenty to choose from.
If you look at the properties of a control you will see something like "Background 1" or "Accent 1, Lighter 25%".
To a color property click the ... and Theme Colors will be shown at the top.

New Themes with different colours and fonts can be created using the ribbon or my free ThemeMker.

If you have set the colors manually they will need to be reset to Themed values. That can be achieved using my ApplyStyle add-in.
Tomorrow I will post a link for ThemeMaker download and a video showing the Add-in.

I am the Peter Cole that isladogs mentioned.
@petertheme Welcome to AWF!
 

petertheme

New member
Local time
Today, 08:47
Joined
Feb 25, 2022
Messages
12
Looking in the morning rather than late at night I see "Back Color" is set as "System Application Background".
For the "Office Access Theme" to work you need to set the "Back Color" of the form to "Background 1, Darker 5%"
If the grey is not dark enough keep increasing the percentage until the required colour is displayed.

If you have continuous forms the "Alternate Back Color" would need to be set to a Themed color if you need to differentiate between rows.

To make the form back color something other than grey try setting set "Back Color" to "Accent 4, Lighter 60%".
The form BackColor will then be
Accent4-60pcLighter.png


Lighten or darken by adjusting the percentage.

This color is Accent 4 in the "Office Theme". If you change the Theme as described in my earlier reply the back color of the form will change.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 03:47
Joined
Feb 19, 2002
Messages
43,257
Are custom themes stored with the database or do you have to distribute them to all users?
 

petertheme

New member
Local time
Today, 08:47
Joined
Feb 25, 2022
Messages
12
The last theme used is stored within the database so there is no need to distribute it to users. So if customers can't choose a different theme there are no problems.
This is the same with Word, Excel and Powerpoint. The included theme in a word document explains why a docx file with only a few characters is thousands of characters in size.

In Access the themes are stored in the hidden system table MSysResources. Each time a theme is selected it is added to the table. If the same theme is selected again the entry in the table is prefixed with a number. When a database is compacted all Themes except the last one are removed

If more than one custom theme needs to be available to users then the other Themes will need to be distributed.

The best way to do that is to create a copy of the MsysResources table before compaction. Then use startup code to extract the themes to the users
C:\Users\UserName\AppData\Roaming\Microsoft\Templates\Document Themes
folder.

Themes have the thmx extension and are a zipped folder. The theme is an XML file which in the thmx file is always called theme1, the actual theme name is contained within the XML.

I find the best way to look at the contents of a thmx file is to use 7zip as it opens zipped files without having to change the name to .zip (useful for looking at the contents of docx and xlsx)

Custom themes can be created using the ribbon but you have to be careful to save your custom theme before your change to a different theme or customisations can be lost.
I created TMDThemMaker to avoid accidental loss.
 

snow-raven

Registered User.
Local time
Today, 00:47
Joined
Apr 12, 2018
Messages
48
I hope you are not trying to make the color customizable for the users. Just come up with something with muted colors and sufficient contrast so that most people will not have trouble reading the text.
Thanks for the advice, Pat, but that only works in a world where all humans are identical. My coworker & I love my new eye-saving muted grey color scheme. My senior user hates it & demands "normal" colors. In this case, compromise would meet in the middle at grey on grey?
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 03:47
Joined
Feb 19, 2002
Messages
43,257
You make the colors that the users want. You don't design to your taste. I'm not sure what customization you can support in an .accde or when running under the Runtime engine.
 

petertheme

New member
Local time
Today, 08:47
Joined
Feb 25, 2022
Messages
12
I agree you make colours for users but using Themes allows you options to have settings for varying users. There are a significant number of people who have problems with red and green,

Themes work in accde and running under the runtime engine.

For illustration, the first image shows the "Office theme" colours as displayed in TMDThememker which is provided as an accde.

thememakerofficecolors.png


Selecting "Facet" theme from the Theme gallery shows.

thememakerfacetolors.png



We see that Text 1 is black and Background 1 is white. Looking at Accent 1 we see Blue in Office and Green in Facet.

By careful setting of Color properties to Theme values it is possible to give different "looks" to a database simply by changing the Theme.

Example.
For a command button by default the back color is
cmdBackcolor.png


Viewed in the Office Theme it displays as
cmd1-office.png


When Facet is selected
cmd1-facet.png


When working with themes the thing to focus on is the relative differences in Lightness (Tint) and Darkness (Shade) not the actual color since changing Themes changes the Base color.

To make the changes not using themes would require multiple loops of code and a lookup table to store color values.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 03:47
Joined
Feb 19, 2002
Messages
43,257
Themes have gotten good enough to use but there is still one problem. The problem revolves around font. Not all the default fonts used are the same scale. I don't know what the correct word is. I'm not talking about point size. In some fonts 10 point letters are larger than 10 point letters in different fonts. Sooooooooo, if you allow the user to change fonts, unless you can determine if that particular font will cause a problem, the user can pick a font that renders larger than the space you have allocated for labels and data. Therefore, if you want to allow the user to change themes, you have to design for the larger rendering fonts so the text won't get cropped.

And you always need to be aware of common color blindness issues. Themes avoid these issues.
 

petertheme

New member
Local time
Today, 08:47
Joined
Feb 25, 2022
Messages
12
The problem can be overcome by using a custom theme.

If a Theme is created using the same fonts as manually all would fit correctly.

You can create a new Theme with different fonts via the ribbon but that can be slightly confusing.

My TMDThemeMaker has a fonts selection option.

tmdFonts.png



The theme name will have the font names added to the end so that it is easy to recognise in the future.
Since applying a Theme is a single click it would be easy to visually check if Text fitted.



Recognising the size differences you described I have a partially developed DB that will give a list of probable alternative fonts that have an actual similar size (Height) to a 'Font to match'. This kind of functionality may be included in a later edition of ThemeMaker.

fontselector.png


The "Pack my box..." praise is on that contains all letters so give a rough guide to the length difference.


.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 03:47
Joined
Feb 19, 2002
Messages
43,257
I'm not saying that I can't get around the problem if I like a theme and am willing to change it. The problem is with allowing USERS to change the theme on the fly
 

Users who are viewing this thread

Top Bottom