To alter the theme color of the Admin Panels, you have to select a theme directory from among theme directories that each contains a full template file, and a full css file. You do this by changing the color directory name in the config/themes file. By default, it looks like this...
As you can see by default it's "blue".
Just as an experiment, I created a new css directory and a file as such:
and inside the style.php file, I pasted the full css code from any one of the color theme folders within default_admin(with the exception of the first 3 colors in the :root, they are all exactly the same).
Then, I copied the template file from the same folder and dropped it into the outer folder as well:
and modified the stylesheet link in that file to look like this...
Notice that the stylesheet is a PHP file, it can contain PHP code, but it has to be a PHP file. Make sure that you state explicitly in the link that the CSS file "style.php" is of type="text/css". And then modify the top of style.php file as follows:
Go back to the "config/themes" file, and remove the "/blue" entirely from the "dir" entry of the $admin_theme array.
You won't need to go back there.
Go to the top of the style.php file and modify the value of $admin_theme_color to whatever makes you happy. Also, you can simply add more color themes to the switch statement as needed, and if there is no defined value, it will default to blue' or whatever you choose to do there.
You'll find that you can get rid of the color named directories; they won't be needed. Or, don't change a thing. Whatever makes you happy.
Not a Question, but an observation concerning Admin Themes.
2 years ago
2 years ago
#1
2 years ago
#2
Good one Charles