XF 2.3 How to understand and modify color codes?

creativeforge

Well-known member
Hi, I'm trying to modify theme colors in Basic colors, where specific XF coding is used, like "darken(@xf-textColor, 35%)". But when I click on it, I cannot see exact colors I would like to have, like #2d3037. Even the Picker is a lot of trial and error to get close to what I want. And then I can't save that to also use it elsewhere.

Is there a tutorial showing us how to create our own re-usable colors and save them as presets to be re-used?

Thanks! :)



colors9.webp
 
Hi, I'm trying to modify theme colors in Basic colors, where specific XF coding is used, like "darken(@xf-textColor, 35%)". But when I click on it, I cannot see exact colors I would like to have, like #2d3037. Even the Picker is a lot of trial and error to get close to what I want. And then I can't save that to also use it elsewhere.

Is there a tutorial showing us how to create our own re-usable colors and save them as presets to be re-used?

Thanks! :)



View attachment 313910
You could use a color picker web browser extension like https://chromewebstore.google.com/detail/color-picker-for-chrome
 
Hi, I'm trying to modify theme colors in Basic colors, where specific XF coding is used, like "darken(@xf-textColor, 35%)". But when I click on it, I cannot see exact colors I would like to have, like #2d3037. Even the Picker is a lot of trial and error to get close to what I want. And then I can't save that to also use it elsewhere.

darken(@xf-textColor, 35%) is not really thaat complicated, it's basically just a LESS function to take the variable @xf-textColor (XenForo color style property textColor) and make this 35% darker.

The actual color of a color style property is shown:
1731618107214.webp

Eg. the color is hsl(0, 0%, 53%) ~ rgb(135, 135, 135) = #878787

As already pointed out, you can just enter a color in hsl, rgb or hex.

It is not possible to save a color as a preset for a color style property as this just doesn't make sense:
If you want to use a color (that does not already exist as a color style property) just create a color style property with the desired value and use taht wherever you need it.
 
Yeah, if you want ot take a color as a base and modify that further.

But if the goal is to just use an exact color I still think it's easier to directly use the input and skip the dialog entirely.

Click into the text input field
Ctrl-A (Select all)
Ctrl-V (Paste)

vs.

Click onto the color preview to open color dialog
Click into the text input field in color dialog
Ctrl-A (Select all)
Ctrl-V (Paste)
Click on update
 
Last edited:
Why that complicated?

Just paste #2d3037 into the text field, no need to even open the color selection dialog.

Thanks! The reason I could not see the color of the code I posted was that it was too close to the original. So I should have tested it with a contrasting color. #2d3037. I really thought it had to be the same format as "darken(@xf-contentBg, 8%)."

Thanks all, much appreciated,

Andre
 
Back
Top Bottom