Skip to main content
Topic: How to change the default font colors?  (Read 383 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How to change the default font colors?

Me again.
I would like to add a new color to the color picker when selecting the font color for a new post, and want to change two old colors slightly.
Where can I do this (theme BeSocial)?  I can't find the right pages again. Only here I could find a line with the names of the current colors (line 81):

themes/default/GenericControls.template.php

ElkArte version: 1.1.8 / Theme: BeSocial / PHP 8.0

Re: How to change the default font colors?

Reply #1

Those are defined in the GenericControls.template.php in your theme directory (or the default theme directory if you do not have a custom one).  In that file (line 80 for me) you will see
Code: [Select]
					colors: "black,red,yellow,pink,green,orange,purple,blue,beige,brown,teal,navy,maroon,limegreen,white",
If I recall, you can change/remove those to whatever you want as long as they are HTML defined color names.  So you should be able to use any of the CSS1/2/3 names as seen here: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
Be safe, Be kind, Happy Programing

Re: How to change the default font colors?

Reply #2

Thank you for the explanation.
I had thought that somewhere I also have to change or enter hex codes of the colors, such as this: #0066CC
ElkArte version: 1.1.8 / Theme: BeSocial / PHP 8.0

 

Re: How to change the default font colors?

Reply #3

Not the editor colors.  Those will simply be rendered as,, for example,<span style="color: darkred;" class="bbc_color">test</span> So simply a named color CSS value that the browser needs to know. 

Now the user can use hexcodes, or RGB values, etc in the BBC color tag,, but the editor is set to only use named colors (at least as far as I know, meaning that is all I've ever tried)
Be safe, Be kind, Happy Programing

Re: How to change the default font colors?

Reply #4

Is that SCEditor you’re using? You should be able to feed it hexcodes with a # in front.

Re: How to change the default font colors?

Reply #5

No, it's the standard/default editor of Elkarte.
But I'll have a closer look at the SCEditor now. :)
ElkArte version: 1.1.8 / Theme: BeSocial / PHP 8.0

Re: How to change the default font colors?

Reply #6

Yes, that’s a component called SCEditor. It does support passing in colours since I did this on my forum, I made a space in the admin where the colour and font options in the editor could be set.