Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: SMF Customization Team on April 16, 2019, 06:00:27 PM

Title: Curve2 Color Changer
Post by: SMF Customization Team on April 16, 2019, 06:00:27 PM
Link to the mod (https://custom.simplemachines.org/index.php?mod=4231)

Curve2 Color Changer



Supported Languages: English, Russian.
Link To Mod (https://custom.simplemachines.org/mods/index.php?mod=4231) | Mod Discussion (https://www.simplemachines.org/community/index.php?topic=567270.0) | Other SMF Customization Team Mods (https://custom.simplemachines.org/index.php?action=profile;u=1)



Compatibility
For SMF 2.1.x

Introduction
Adds color settings for the the SMF 2.1 default theme

Installation
Any previous versions of this mod MUST be uninstalled BEFORE installing this version.
This mod is mainly for the default theme, custom themes might be compatible depending on the author of the custom theme.

Usage in custom themes (for theme authors)
If you wish to make use of the mod and allow admins to change colors in your theme, add an array with the following format to template_init()

$settings['color_changes'] = array(
    'COLOR_TYPE' => array(
        array(
            'variable' => 'CSS-VAR',
            'elements' => '.ELEMENT, #ANOTHER_ELEMENT',
            'properties' => array('PROPERTY_NAME', 'ANOTHER_PROPERTY' => '{color}')
        )
        array(...)
    ),
    ...
);

You can use one of the already declared color types :
'background', 'foreground', 'primary_color', 'secondary_color', 'top_section', 'footer', 'links', 'gradient_end', 'gradient_start', 'blocks_color', 'blocks_alternate_color', 'borders_color', 'buttons_text_color', 'buttons_bg', 'buttons_border', 'special_titles_color'

Or you can use a new color type, but you'll have to give it a text string in this format:
$txt['cc_COLOR_TYPE'] = 'STRING';

Properties will be given the value of the color, and you can also use {color} and it will be replaced with the color's value.

And since version v1.4, you can also target css variables and add different selectors.
To add more selectors to root, you can add them to $settings['color_changes_root'] as array values.
$settings['color_changes_root'] = array(
    '.blue',
    '.red',
    '[data-colormode="dark"]'
);
This will output something like this:
:root,:root.blue,:root.red,:root[data-colormode="dark"] { --CSS-VAR: value; };

Example from the default theme:
<?php
$settings
['color_changes'] = array(
    
'background' => array(
        array(
            
'elements' => 'body',
            
'properties' => array('background')
        )
    ),
    
'primary_color' => array(
        array(
            
'elements' => 'div.cat_bar, .amt, .dropmenu li a:hover, .dropmenu li:hover a, .dropmenu li a:focus,
            #top_info > li > a:hover, #top_info > li:hover > a, #top_info > li > a.open, .button.active, .button.active:hover'
,
            
'properties' => array('background''border-color')
        ),
        array(
            
'elements' => '#footer',
            
'properties' => array('background')
        ),
        array(
            
'elements' => '.button.active, .button.active:hover',
            
'properties' => array('color' => '#fff')
        )
    ),
    
'gradient_start' => array(
        array(
            
'elements' => '.dropmenu li ul, .top_menu, .dropmenu li li:hover, .button, .dropmenu li li:hover > a, .dropmenu li li a:focus,
            .dropmenu li li a:hover, #top_section, #search_form .button, .quickbuttons li, .quickbuttons li ul, .quickbuttons li ul li:hover,
            .quickbuttons ul li a:focus, .popup_window, #inner_section'
,
            
'properties' => array('background-image' => 'linear-gradient(to bottom, {color} 0%, transparent 70%)')
        ),
        array(
            
'elements' => '.button:hover, .quickbuttons li:hover, .navigate_section ul, .popup_content, .up_contain,
            .button:hover, #search_form .button:hover, .quickbuttons li:hover'
,
            
'properties' => array('background-image' => 'linear-gradient(to bottom, transparent 0%, {color} 70%)')
        )
    ),
);


Support
Please use the modification thread for support with this modification.

Changelog
Version 1.4.2 - 15 October 2022
- Fixed undefined errors when no settings are saved

Version 1.4.1 - 28 February 2022
- Added option for sticky+locked status
- Added option for :target content

Version 1.4 - 27 February 2022
- Added support for CSS vars
- Added sticky, approved and locked topics color options
- Fixed check for elements/properties before trying to add them
- Fixed "Use default color" for individual settings
- Fixed minor issues with coloring

Version 1.3 - 27 October 2021
- Check against theme authors having defined color palette/s for their theme
- Fixed problems with default colors

Version 1.2.2 - 27 October 2021
- Check if there are any default settings first

Version 1.2.1 - 10 October 2021
- Insert default settings if not set

Version 1.2 - 24 August 2021
- Fixed 'Remove shadows' option
- Set a default color on all of the palettes
- Fixed button color on "focus" state

Version 1.1 - 23 August 2021
- Fixed default palette
- Adds labels for palettes
- Added default curve palette
- Added Russian translation

Version 1.0 - April 2019
- Initial Release


Copyright (c) 2021, Simple Machines, under BSD 3-Clause License.
All rights reserved.
Title: Re: Curve2 Color Changer
Post by: GigaWatt on April 16, 2019, 06:19:05 PM
Nice 8).
Title: Re: Curve2 Color Changer
Post by: -Rock Lee- on April 16, 2019, 07:20:40 PM
Great job!


Regards!
Title: Re: Curve2 Color Changer
Post by: skb on April 17, 2019, 04:28:22 AM
Can this be board specific ?
Title: Re: Curve2 Color Changer
Post by: SychO on April 17, 2019, 05:01:54 AM
Quote from: skb on April 17, 2019, 04:28:22 AM
Can this be board specific ?

nope, it cannot
Title: Re: Curve2 Color Changer
Post by: pocttopus on April 17, 2019, 07:28:47 AM
А very useful idea.
Amazing!  :)
Title: Re: Curve2 Color Changer
Post by: Antechinus on April 17, 2019, 08:40:06 AM
Haven't checked out the guts of it yet, but I'm guessing this adds a range of user-specific theme settings to deal with all the possible options.

Has anyone done some checking on the performance implications for large and/or busy sites?
Title: Re: Curve2 Color Changer
Post by: SychO on April 17, 2019, 09:14:45 AM
Quote from: Antechinus on April 17, 2019, 08:40:06 AM
Haven't checked out the guts of it yet, but I'm guessing this adds a range of user-specific theme settings to deal with all the possible options.

Has anyone done some checking on the performance implications for large and/or busy sites?

Not user-specific, that would be too much :/

The settings are admin-specific.
Title: Re: Curve2 Color Changer
Post by: Antechinus on April 17, 2019, 05:20:23 PM
Then why does it say "allow users to change colors"?
Title: Re: Curve2 Color Changer
Post by: Arantor on April 17, 2019, 05:28:34 PM
The admin is a user?
Title: Re: Curve2 Color Changer
Post by: Antechinus on April 17, 2019, 06:23:31 PM
A tad ambiguous, as SychO's post demonstrates, but ok.
Title: Re: Curve2 Color Changer
Post by: SychO on April 17, 2019, 06:27:16 PM
edited to avoid confusion
Title: Re: Curve2 Color Changer
Post by: digzu on June 25, 2019, 06:17:44 AM
This is great... but it doesn't seem to work when duplicating the default theme into another folder for the newly created theme.

Also for some reason general text colour can't be changed.

Nice work, though :3
Title: Re: Curve2 Color Changer
Post by: Hatshepsut on June 25, 2019, 07:21:36 AM
Quote from: digzu on June 25, 2019, 06:17:44 AM
This is great... but it doesn't seem to work when duplicating the default theme into another folder for the newly created theme.

Also for some reason general text colour can't be changed.

Nice work, though :3

You can change text color, look for "Foreground color" option in "Configuration => Current theme" :)
Title: Re: Curve2 Color Changer
Post by: vbgamer45 on August 07, 2019, 01:20:30 PM
I really like this. Wish this was bundled with 2.1 gives users more options.
Title: Re: Curve2 Color Changer
Post by: jonat on September 09, 2019, 04:17:22 PM
I made a copy of the default Curve theme and added the code as shown above to template_init() right after:

if (!isset($settings['disable_files']))
$settings['disable_files'] = array();


, but I don't get the options for that theme. (I want to make it darker.) I am using 2.1RC2 and there aren't many (any?) dark themes compatible with it yet.  (Tried Lunarfall, but it garbles text for reasons I haven't figured out.) Is there something else I need to do?

Title: Re: Curve2 Color Changer
Post by: GirlinGray on January 17, 2020, 08:31:51 PM
Hi, this looks great. My forum is running SMF 2.0.15.

Do you know if this will work with SMF 2.0.15 -- or must I shift up to SMF 2.1x first?

Thanks.
Title: Re: Curve2 Color Changer
Post by: SychO on January 18, 2020, 03:08:33 AM
This is not compatible with 2.0.x
Title: Re: Curve2 Color Changer
Post by: GirlinGray on January 18, 2020, 06:44:26 AM
Thanks, good to know.

I was not even aware there was an SMF 2.1. Ahhh!
Title: Re: Curve2 Color Changer
Post by: beckzy on October 16, 2020, 02:16:32 PM
Hi! Will this work with SMF 2.1 RC3? Thanks :)
Title: Re: Curve2 Color Changer
Post by: Arantor on October 16, 2020, 02:17:41 PM
Maybe wait for more than a day for RC3 to be out for mod authors to have the time to check?
Title: Re: Curve2 Color Changer
Post by: vbgamer45 on October 16, 2020, 03:02:41 PM
Have confirmed it works as is no changes needed. Marked as supports RC3
Title: Re: Curve2 Color Changer
Post by: Recursos on October 27, 2020, 02:20:03 PM
This mod is very useful for newbies like me!

QuoteIntroduction
Adds color settings for the the SMF 2.1 default theme

Installation
(...)
This mod is mainly for the default theme, custom themes might be compatible depending on the author of the custom theme.
After applying the mod to the default theme, which work nicely, I tried:
making a copy of the default theme,
then making it temporarily default,
then applying the mod.
But to no avail, it didn't show on edit themes.

Anything I could try to make it work on this "default twin?
Rec
Title: Re: Curve2 Color Changer
Post by: Aleksi "Lex" Kilpinen on October 27, 2020, 02:34:10 PM
Quote from: vbgamer45 on October 16, 2020, 03:02:41 PM
Have confirmed it works as is no changes needed. Marked as supports RC3
Been testing this a couple of days now - and works, yes, but at least with the premade color set with a blue background there are some areas in the forum that don't really look too good.
Admin help popups - Near impossible to read. Some buttons in the forum - same deal. Topic index, have more than 2 pinned topics and you may see pink... Not sure if these are huge issues, but just feel like there could be room for improvement. The brighter color sets work well as far as I can tell. Haven't had the time to fiddle with it to see if those small issues could be fixed by adjusting the colors, or if the mod needs further tweaking at it's core.

EDIT: Correction, the pink wasn't about the amount of stickies - but the background for a locked topic. Still, kinda funky looking on a blue bg.
Title: Re: Curve2 Color Changer
Post by: Recursos on October 28, 2020, 03:24:44 PM
re: my previous post (https://www.simplemachines.org/community/index.php?topic=567270.msg4072263#msg4072263)

Meanwhile I realized that other then the files,
the database is also changed by the mod
at least table ' smf_themes'
Rec
Title: Re: Curve2 Color Changer
Post by: gevv on February 03, 2021, 01:41:46 PM
Hi,

Can users be made to choose their own style?
Title: Re: Curve2 Color Changer
Post by: camefromwpandmybb on May 29, 2021, 03:18:06 AM
stupid question, running 2.1rc3. 

so uploaded the 3 files in the correct directory of the default theme, where do i activate this or use it to change the colors of the theme? 

Move the included file "Class-ColorChanger.php" to "./Sources".
Move the included file "ColorChanger.js" to "./Themes/default/scripts".
Move the included file "ColorChanger.english.php" to "./Themes/default/languages".

couldn't figure it out.

so i made a copy of the default theme called "copy of default" and uploaded the following files

Move the included file "Class-ColorChanger.php" to "./Sources".
Move the included file "ColorChanger.js" to "./Themes/copy of default/scripts".
Move the included file "ColorChanger.english.php" to "./Themes/default/languages".

still can't figure it out.

help please

Title: Re: Curve2 Color Changer
Post by: Aleksi "Lex" Kilpinen on May 29, 2021, 04:10:24 AM
Quote from: camefromwpandmybb on May 29, 2021, 03:18:06 AM
stupid question, running 2.1rc3. 

so uploaded the 3 files in the correct directory of the default theme, where do i activate this or use it to change the colors of the theme? 

The mod adds color options in the theme settings in admin control panel.
Title: Re: Curve2 Color Changer
Post by: live627 on May 29, 2021, 11:38:21 AM
installs via package managerr
Title: Re: Curve2 Color Changer
Post by: camefromwpandmybb on May 29, 2021, 02:27:59 PM
thanks i know that but it would not install so i just uploaded the files, i "parsed" the instructions and there were no instructions to modify any files that i could manually
Title: Re: Curve2 Color Changer
Post by: shadav on May 29, 2021, 03:47:04 PM
according to the parse

QuoteIf you wish to make use of the mod and allow users to change colors in your theme, add an array with the following format to template_init()

did you add the code from the parse? with any of the declared color types?
Title: Re: Curve2 Color Changer
Post by: camefromwpandmybb on May 29, 2021, 07:23:46 PM
hi. which file would i modify. i thought that was an "optional" thing
Title: Re: Curve2 Color Changer
Post by: Shades. on July 08, 2021, 06:53:19 PM
Im having problems with the link color changer.

Quoting from my other thread: https://www.simplemachines.org/community/index.php?topic=578117.msg4091411#msg4091411

QuoteUnderneath the post on 2.1 RC3 in the lower right corner there are 3 buttons..."Quote", "Quick Edit", and "More". The first two colors are correct but the "More" on the 3rd button is orange.

QuoteI think it has something to do with the color changer mod cause I went in the mod settings and changed the link color to #fff and it made all links white including that one button but not the rest of the buttons. So for some reason the mod is controlling the color of that 3rd button. Weird! I want all the text links to be orange and all the button links to be white. ugh...
Title: Re: Curve2 Color Changer
Post by: Shades. on August 18, 2021, 05:04:07 AM
I see this just got a hook update (I think) but the "select" colors option don't work in RC4 like they did in RC3 and I'm sure it needs a "js" code added somewhere but where I don't know? :o  8)
Title: Re: Curve2 Color Changer
Post by: Diego Andrés on August 18, 2021, 01:41:27 PM
It always used hooks only, will investigate this issue once we sort out other stuff, thanks for reporting.
Title: Re: Curve2 Color Changer
Post by: Diego Andrés on August 23, 2021, 05:42:52 PM
Version 1.1 - August 2021
- Fixed default palette
- Adds labels for palettes
- Added default curve palette
- Added Russian translation

Thanks to @Bugo for contributing in the update and for providing translation to Russian.
Title: Re: Curve2 Color Changer
Post by: Shades. on August 24, 2021, 11:22:16 AM
I have "Remove shadows:" checked but still seeing some shadows. (See attachment)shadows.PNG
Title: Re: Curve2 Color Changer
Post by: Diego Andrés on August 24, 2021, 03:37:51 PM
Fix coming later, thanks for reporting
Title: Re: Curve2 Color Changer
Post by: Diego Andrés on August 24, 2021, 07:20:34 PM
Quote from: Shades. on August 24, 2021, 11:22:16 AMI have "Remove shadows:" checked but still seeing some shadows.
Fixed

Version 1.2 - 24 August 2021
- Fixed 'Remove shadows' option
- Set a default color on all of the palettes
- Fixed button color on "focus" state
Title: Re: Curve2 Color Changer
Post by: Shades. on August 24, 2021, 08:19:22 PM
Perfect thanks! 8)
Title: Re: Curve2 Color Changer
Post by: pocttopus on September 04, 2021, 08:03:23 AM
This is amazing.
It works on 2.1RC4.
Please share your combination of colors.  ;)
Title: Re: Curve2 Color Changer
Post by: peter_mein on September 05, 2021, 05:56:20 AM
Hello
Is it possible to change the colour for board icons ?
and i see the different between read article and unread article ?
Better i can selecet another colour for read and unread article.

Title: Re: Curve2 Color Changer
Post by: Diego Andrés on September 05, 2021, 02:00:01 PM
No, board icons are images so it's not possible.
Although you could, using FA Board Icons mod
Title: Re: Curve2 Color Changer
Post by: Antechinus on September 05, 2021, 10:31:12 PM
Quote from: peter_mein on September 05, 2021, 05:56:20 AMHello
Is it possible to change the colour for board icons ?
Not with this mod, but you can with custom CSS. ;)

/* -------------------------------- */
/* @todo - With optional animation. */
.board_on {
    filter: saturate(.8) sepia(.5);
    animation: BoardOnPulse 3s infinite;
}
.board_on2 {
    filter: sepia(.5) brightness(.7);
    animation: BoardOnPulse 3s infinite;
}
@keyframes BoardOnPulse{
    0% {
        opacity: .8;
    }
    30% {
        opacity: .8;
    }
    70% {
        opacity: 1;
    }
    100% {
        opacity: .8;
    }
}
/* -------------------------------- */
/* @todo - Icon tweaks. */
.board_off {
    filter: brightness(.5);
}
.board_redirect {
    filter: brightness(.7);
}
Title: Re: Curve2 Color Changer
Post by: meccep45 on September 06, 2021, 04:17:44 AM
if you turn them off, they will multiply. if you enable it, two errors will occur.
Hook call: function "outputCss" in file /share/nginx/html could not be called.
The callable outputCss could not be called.
Screenshot.png
 
Title: Re: Curve2 Color Changer
Post by: Diego Andrés on September 06, 2021, 01:58:43 PM
I think that could be an SMF issue
Title: Re: Curve2 Color Changer
Post by: Shades. on September 17, 2021, 05:49:30 PM
I have installed this multiple times on fresh 2.1RC4 and get the same errors after install and reset colors to default. I get 68 errors each time of the same two below. No errors changing colors manually this just happens after install.

QuoteError
Type of error
Undefined_vars
Error message
8: Undefined index: cc_remove_shadows
File
/home2/*****/public_html/Sources/Class-ColorChanger.php
Line
404
URL of page causing the error
https://*****.com/index.php?action=admin;area=theme;sa=list;th=1

Backtrace information
#0: smf_error_handler()
Called from /home2/*****/public_html/Sources/Class-ColorChanger.php on line 404
#1: buildCss()
Called from /home2/*****/public_html/Sources/Class-ColorChanger.php on line 226
#2: outputCss()
Called from /home2/*****/public_html/Sources/Subs.php on line 5380
#3: call_integration_hook()
Called from /home2/*****/public_html/Sources/Subs.php on line 4465
#4: template_css()
Called from /home2/*****/public_html/Themes/default/index.template.php on line 119
#5: template_html_above()
Called from /home2/*****/public_html/Sources/Load.php on line 2677
#6: loadSubTemplate()
Called from /home2/*****/public_html/Sources/Subs.php on line 4187
#7: template_header()
Called from /home2/*****/public_html/Sources/Subs.php on line 3794
#8: obExit()
Called from /home2/*****/public_html/index.php on line 190

QuoteError
Type of error
Undefined_vars
Error message
8: Undefined index: cc_special_titles_color
File
/home2/*****/public_html/Sources/Class-ColorChanger.php
Line
417
URL of page causing the error
https://*****.com/index.php?action=admin;area=theme;sa=list;th=1

Backtrace information
#0: smf_error_handler()
Called from /home2/*****/public_html/Sources/Class-ColorChanger.php on line 417
#1: buildCss()
Called from /home2/*****/public_html/Sources/Class-ColorChanger.php on line 226
#2: outputCss()
Called from /home2/*****/public_html/Sources/Subs.php on line 5380
#3: call_integration_hook()
Called from /home2/*****/public_html/Sources/Subs.php on line 4465
#4: template_css()
Called from /home2/*****/public_html/Themes/default/index.template.php on line 119
#5: template_html_above()
Called from /home2/*****/public_html/Sources/Load.php on line 2677
#6: loadSubTemplate()
Called from /home2/*****/public_html/Sources/Subs.php on line 4187
#7: template_header()
Called from /home2/*****/public_html/Sources/Subs.php on line 3794
#8: obExit()
Called from /home2/*****/public_html/index.php on line 190
Title: Re: Curve2 Color Changer
Post by: Diego Andrés on October 10, 2021, 01:57:33 AM
Sorry I forgot about this issue.
It has been resolved with the new update

Version 1.2.1 - 10 October 2021
- Insert default settings if not set
Title: Re: Curve2 Color Changer
Post by: Mick. on October 26, 2021, 09:57:13 PM
@Diego Andrés  It installed but I got this pesky error in case you forgot something lol

Sources/Class-ColorChanger.php (Line 569)
2: Invalid argument supplied for foreach()

and this one...

Sources/Class-ColorChanger.php (Line 569)
8: Trying to access array offset on value of type null


First line.
foreach ($palettes['default'] as $color_setting => $color)
{
if (!isset($settings['cc_' . $color_setting]))
$default_settings['cc_' . $color_setting] = $color;
}
Title: Re: Curve2 Color Changer
Post by: Diego Andrés on October 27, 2021, 12:54:46 PM
Fixed

Version 1.2.2 - 27 October 2021
- Check if there are any default settings first
Title: Re: Curve2 Color Changer
Post by: Mick. on October 27, 2021, 04:39:11 PM
This error is out of my custom theme. Do I need another file?

Sources/Class-ColorChanger.php (Line 404)
8: Undefined index: primary_color

Sources/Class-ColorChanger.php (Line 404)
8: Undefined index: gradient_start

and this one..
Sources/Class-ColorChanger.php (Line 394)
8: Trying to access array offset on value of type null

My setup:
    // Color Switcher
    $settings['color_changes'] = array(
    'primary_color' => array(
        array(
            'elements' => '.amt, .dropmenu li a.active, #top_info li a.active, #top_info > li > a:hover, #top_info > li:hover > a, #top_info > li > a.open, .dropmenu li a:hover, .dropmenu li:hover a, .dropmenu li a:focus, .button.active, .button.active:hover, .news2, .row-album, .project .overlay, .title_bar, .go-top, .menu li a:hover, .menu li:hover > a, .menu ul li a:hover, .menu ul li:hover > a, .hero-button',
            'properties' => array('background', 'border-color')
        ),
        array(
            'elements' => 'a, .bbc_link, .code, .top_links a:hover, .footer_article ul li a:hover, #footer a:hover, .current_page, .news3 h2, .page_number, blockquote cite::before, .forumtitle i',
            'properties' => array('color')
        ),
        array(
            'elements' => 'a:hover, .bbc_link:hover',
            'properties' => array('color' => '#fff')
        ),
        array(
            'elements' => '.hero-button:hover',
            'properties' => array('background', 'border-color')
        ),
    ),
    'gradient_start' => array(
        array(
            'elements' => '.news2, .news3, .title_bar',
            'properties' => array('background-image' => 'linear-gradient(to right, transparent 0%, {color} 70%)')
        )
    ),
);

index.template, Right before
    // Allow css/js files to be disabled for this specific theme.
Title: Re: Curve2 Color Changer
Post by: Diego Andrés on October 27, 2021, 10:27:13 PM
I believe that's because you need to define the palettes/default colors for your theme.
I've fixed it just in case theme author doesn't add the palettes, will post the update soon.
Title: Re: Curve2 Color Changer
Post by: Diego Andrés on October 27, 2021, 10:47:21 PM
Version 1.3 - 27 October 2021
- Check against theme authors having defined color palette/s for their theme
- Fixed problems with default colors
Title: Re: Curve2 Color Changer
Post by: Mick. on October 27, 2021, 10:49:39 PM
Quote from: Diego Andrés on October 27, 2021, 10:27:13 PMI believe that's because you need to define the palettes/default colors for your theme.
I've fixed it just in case theme author doesn't add the palettes, will post the update soon.
Awesome thank you. Maybe that's why [Reset all to default] doesn't reset.
Title: Re: Curve2 Color Changer
Post by: Mick. on October 27, 2021, 10:55:22 PM
Yup. You got it. Errors are gone and [Reset all to default] is gone as well. Much better.

Thanx Diego.
Title: Re: Curve2 Color Changer
Post by: Mick. on October 27, 2021, 11:33:42 PM
I think some sort of tick is needed. What if the admin does not want to use the color changer? I don't see an option....maybe bring back reset to default?
Title: Re: Curve2 Color Changer
Post by: Diego Andrés on October 27, 2021, 11:41:11 PM
That's where the default palette is needed so it always has "default colors".
Unfortunately the html color input is quite ******ty at the moment so it defaults to black (not to mention only hex colors)
Title: Re: Curve2 Color Changer
Post by: Mick. on October 27, 2021, 11:53:47 PM
What if we add color_changes tick setting in theme options? On/Off Would that work?
Title: Re: Curve2 Color Changer
Post by: Diego Andrés on October 27, 2021, 11:56:30 PM
Well you also must remember that the admin would install this mod because already decided to use the color changer.
I still think offering palettes is a solid option for presets and default values.
Title: Re: Curve2 Color Changer
Post by: Mick. on October 28, 2021, 06:34:33 AM
Quote from: Diego Andrés on October 27, 2021, 11:56:30 PMWell you also must remember that the admin would install this mod because already decided to use the color changer.
I still think offering palettes is a solid option for presets and default values.
Ya I think so too
Title: Re: Curve2 Color Changer
Post by: TurtleKicker on October 30, 2021, 04:51:40 PM
Wow, loving this so much. Thank you for making it.

I no longer feel so much urgency to find an alternate 3rd-party theme to Curve2.
Title: Re: Curve2 Color Changer
Post by: Speed King on October 30, 2021, 10:38:14 PM
Quote from: TurtleKicker on October 30, 2021, 04:51:40 PMWow, loving this so much. Thank you for making it.

I no longer feel so much urgency to find an alternate 3rd-party theme to Curve2.

The better way is to create a copy of default theme and then edit colors in theme's index.css file :)
Title: Re: Curve2 Color Changer
Post by: pikeman on February 13, 2022, 05:22:59 AM
Works well with 2.1.1. :)
Title: Re: Curve2 Color Changer
Post by: davo88 on February 20, 2022, 03:17:20 AM
Is it possible to change the color of the text in a post with this mod?
The color currently looks like a dark grey and I would like to make it black.
Or maybe it looks greyish because it is a fine font? I don't know.
Title: Re: Curve2 Color Changer
Post by: Speed King on February 20, 2022, 05:55:12 AM
Quote from: davo88 on February 20, 2022, 03:17:20 AMIs it possible to change the color of the text in a post with this mod?
The color currently looks like a dark grey and I would like to make it black.
Or maybe it looks greyish because it is a fine font? I don't know.

Yes, look for "Foreground color" option and set #000000 color (black)
Title: Re: Curve2 Color Changer
Post by: davo88 on February 20, 2022, 03:11:53 PM
That's great Speed King. Thanks very much.
Title: Re: Curve2 Color Changer
Post by: Johnny Thunder on February 21, 2022, 02:14:46 AM
Hi.
I am loving this mod and it has made our users very happy.
I have everything pretty much set up as needed but there is one area where I cannot see how to alter a colour.
On pinned topics at the top of the forum, alternate topics still have a blue background that I can't alter.
Is there possibly a way for me to achieve this?

Thank you for an amazing mod.



forumcolour.jpg
Title: Re: Curve2 Color Changer
Post by: FrizzleFried on February 23, 2022, 05:43:44 PM
I noticed this colorizer doesn't seem to offer color changing for:

• Title of post once inside of thread... always seems to be black for me.
• Background color for LOCKED threads.

Am I missing these / mistaken or?
Title: Re: Curve2 Color Changer
Post by: Diego Andrés on February 26, 2022, 02:08:39 PM
I'll add those soon hopefully
Title: Re: Curve2 Color Changer
Post by: Diego Andrés on February 27, 2022, 03:36:44 PM
Version 1.4 - 27 February 2022
- Added support for CSS vars
- Added sticky, approved and locked topics color options
- Fixed check for elements/properties before trying to add them
- Fixed "Use default color" for individual settings
- Fixed minor issues with coloring

Please report any issues you may encounter.
Thanks.
Title: Re: Curve2 Color Changer
Post by: gevv on February 27, 2022, 03:38:19 PM
Thanks for the effort and update.
Title: Re: Curve2 Color Changer
Post by: pikeman on February 27, 2022, 04:05:41 PM
Thanks! :)
Title: Re: Curve2 Color Changer
Post by: Mick. on February 27, 2022, 04:42:13 PM
Sigh. Imma try this again for a custom theme I'm working on since now I know the concept of dark mode.
Title: Re: Curve2 Color Changer
Post by: Johnny Thunder on February 28, 2022, 09:59:25 AM
Brilliant Diego.

Do I need to uninstall 1.3 or just install 1.4 over it?



Thank you.
Title: Re: Curve2 Color Changer
Post by: Shades. on February 28, 2022, 10:02:05 AM
Quote from: SMF Customization Team on April 16, 2019, 06:00:27 PMInstallation
Any previous versions of this mod MUST be uninstalled BEFORE installing this version.
This mod is mainly for the default theme, custom themes might be compatible depending on the author of the custom theme.
;)
Title: Re: Curve2 Color Changer
Post by: Diego Andrés on February 28, 2022, 10:03:39 AM
You *could* just replace Class-ColorChanger.php.
But uninstall and install is the way to go, not installing over.
Title: Re: Curve2 Color Changer
Post by: Johnny Thunder on February 28, 2022, 10:04:29 AM
Thank you very much.
Title: Re: Curve2 Color Changer
Post by: FrizzleFried on February 28, 2022, 10:17:24 AM
Hello...

Using New Version... STICKY TOPIC background is changing both STICKY TOPIC and LOCKED TOPIC's colors to the STICKY TOPIC color if the post is set both as STICKY and LOCKED.

Typical SMF behavior (at least from what I can see) is to show the LOCKED background color for locked topics regardless of whether they are stickied or not...

Also,  I am still not seeing a way to adjust the text color for the name of a post from within the post itself.  I have a dark theme going and it's real hard to see that black text on dark gray background.

:(

THANK YOU!
Title: Re: Curve2 Color Changer
Post by: Diego Andrés on February 28, 2022, 10:21:13 AM
Partially right yes, but Locked+Sticky have a different color than just locked in the default behavior.
I'll see about adding this as well, along with windowbg:target.
Title: Re: Curve2 Color Changer
Post by: Diego Andrés on February 28, 2022, 01:47:41 PM
Version 1.4.1 - 28 February 2022
- Added option for sticky+locked status
- Added option for :target content
Title: Re: Curve2 Color Changer
Post by: Steve on March 24, 2022, 05:59:18 AM
This question has been asked a few times but either glossed over or not answered completely imo, at least, not so that I can understand it. :P

How do I make a copy of this with the default Blue scheme (for example) while keeping a copy of the original default theme?
Title: Re: Curve2 Color Changer
Post by: FrizzleFried on March 24, 2022, 10:22:19 AM
What I did was made a copy of the default theme without changing the colors... called that "Curve2 - White" then I modified the actual default time to a dark version and called that "Curve2 - Dark"...

...though I agree it would be beneficial if the mod could be modified to be easily installed on multiple stock themes rather than just the one.

Title: Re: Curve2 Color Changer
Post by: Diego Andrés on March 24, 2022, 10:31:02 AM
The theme authors should include support for it, the mod can't do too much about that.
Title: Re: Curve2 Color Changer
Post by: Steve on March 24, 2022, 11:16:10 AM
What theme authors, Diego? We're just asking why this Curve2 can't be duplicated more than once with all the default themes available in this mod. I'm confused.

Or do you mean the Curve2 authors?
Title: Re: Curve2 Color Changer
Post by: Diego Andrés on March 24, 2022, 11:18:34 AM
Not sure I'm following the discussion then.
What exactly are you referring to? The color palettes?
Title: Re: Curve2 Color Changer
Post by: FrizzleFried on March 24, 2022, 11:49:59 AM
Currently when you install the mod it will only install on one instance of Curve2.  Evidently there is a way to hack it (from what I read in this thread) to allow for multiple instances of the mod installed on multiple instances of Curve2... but what would be nice is an out of the box option to install on multiple instances of Curve2.
Title: Re: Curve2 Color Changer
Post by: Diego Andrés on March 24, 2022, 11:52:41 AM
Those are essentially different themes, so it'd be required to be implemented on the theme itself.
Out of the box it works for the default theme, copies of the default theme are not the default theme anymore.
Title: Re: Curve2 Color Changer
Post by: FrizzleFried on March 24, 2022, 12:07:58 PM
OK.  We have that established.  It would be nice if the mod would work with multiple themes.  (This discussion has suddenly gotten oddly circular).

Title: Re: Curve2 Color Changer
Post by: Diego Andrés on March 24, 2022, 12:10:58 PM
It does work with other themes.
The description provides a little guide on how to add support for the mod in custom themes.
Title: Re: Curve2 Color Changer
Post by: Aleksi "Lex" Kilpinen on March 24, 2022, 12:15:20 PM
I actually echo all of that.

This installs nicely on the default theme, but I too would have actually preferred installing this to a copy of the default instead, keeping the original default as is. Could not figure it out easily, so I just went the other way around.
Title: Re: Curve2 Color Changer
Post by: FrizzleFried on March 24, 2022, 12:37:16 PM
Quote from: Diego Andrés on March 24, 2022, 12:10:58 PMIt does work with other themes.
The description provides a little guide on how to add support for the mod in custom themes.

Very circular.  :)

We know this.  Again,  however that is something that many of us haven't the experience to install hence the request.  It sounds as if it's simply impossible (or undesirable on your part) to add the ability to choose which currently installed themes to install the mod to at installation (like the mods of old that could choose which themes to make edits to, etc.).

No big deal.  I will get around it by doing what I did... It just would make things easier if each individual instance of Curve2 installed could be tweaked independently.

Thank you anyway and thank you for your already mighty fine mod.
Title: Re: Curve2 Color Changer
Post by: Arantor on March 24, 2022, 12:41:14 PM
No, that's not it either.

For this mod to work on a given theme, the theme has to have specific support for it. We can know in advance that Themes/default will work. We cannot know about *any* other theme as to whether it supports this mod or not.

As a result it's safer to assume *no* other theme supports it (especially as many 2.0 themes are being ported to 2.1 rather than starting from 2.1) and go from there.

The other thing is that you're seeing "a copy of the default theme" as something special and not "just another theme". Once it's created, it is "just another theme" that SMF knows nothing special about, and assumes it is as custom as any other.

It's a hard problem to solve.
Title: Re: Curve2 Color Changer
Post by: Diego Andrés on March 24, 2022, 01:26:37 PM
The only workaround for this would be to have another variable that could help the mod "assume" you want the same color palettes and settings as the default theme. It'd still require to have a manually added code to the custom theme in any case.
Title: Re: Curve2 Color Changer
Post by: Arantor on March 24, 2022, 01:35:24 PM
So the solution is to bake it into the default theme directly in 2.2  O:)
Title: Re: Curve2 Color Changer
Post by: Diego Andrés on March 24, 2022, 01:38:19 PM
Oh that would be something else entirely and done differently perhaps  :laugh:
I was referring to another dummy var such as $settings['color_changes_default_copy'] = true;
Title: Re: Curve2 Color Changer
Post by: Arantor on March 24, 2022, 03:04:51 PM
Well, yes, but you see my point - there is a 'for now' fix and a 'longer term roadmap' fix to be had here.
Title: Re: Curve2 Color Changer
Post by: Michael Vail on April 13, 2022, 01:21:27 AM
Thank you so much for this! I absolutely love it!

Great Mod!
Title: Re: Curve2 Color Changer
Post by: davo88 on April 25, 2022, 04:27:58 AM
Anybody know a way to change the color of the category names on the main page?
In the attached snip, it's the white text "General Category".

2022-04-25 - Screenshot 009.png
Title: Re: Curve2 Color Changer
Post by: @rjen on April 25, 2022, 05:09:13 AM
Check your index.css, look for


.info .subject {
   font-weight: 600;
   font-size: 1.1em;
   color: #a85400;
}

Change the color to match your requirements
Title: Re: Curve2 Color Changer
Post by: davo88 on April 25, 2022, 03:48:10 PM
Thanks very much for your reply @rjen.

I tried the change in two test forums

In #1, there was no change. I don't understand where or how Curve2 Color Changer stores the changes it makes. Do edits to the index.css have to be made in another file when this mod is installed?

In #2, the change worked, but it changed the Forum title (red) rather than the Category title.

2022-04-26 - Screenshot.png
Title: Re: Curve2 Color Changer
Post by: Shades. on April 25, 2022, 04:09:55 PM
In index.css

Find:
h3.catbg, h3.catbg a, h3.catbg a:hover {
color: #fff;
}

Change to:
h3.catbg, h3.catbg a, h3.catbg a:hover {
color: #fff !important;
}

Change the #fff to your color of choice and make sure to leave the "!important;" text so it will override the color changer mod! ;)
Title: Re: Curve2 Color Changer
Post by: @rjen on April 25, 2022, 04:12:15 PM
Quote from: davo88 on April 25, 2022, 03:48:10 PMThanks very much for your reply @rjen.

I tried the change in two test forums
  • One with Curve2 Color Changer installed and in use
  • One a fresh install of 2.1.1 - no modifications at all

In #1, there was no change. I don't understand where or how Curve2 Color Changer stores the changes it makes. Do edits to the index.css have to be made in another file when this mod is installed?

In #2, the change worked, but it changed the Forum title (red) rather than the Category title.

I misread your request. Shades posted the correct solution... just a warning: that bit of css will affect h3.catbg elements in other places in the forum as well. Not so easy to just target the category titles...
Title: Re: Curve2 Color Changer
Post by: IamTheBoy on April 26, 2022, 10:03:15 AM
Looks to be just the mod I need, thanks!

However, getting an error that hints it may be due to this mod...


/var/www/html/forum/Sources/Class-ColorChanger.php (Line 264)
Type of error: Cron
Error messageSelect
8: Undefined index: theme_id


Is this from this mod, or do I need to post this in 2.1 Support?


Cheers
Title: Re: Curve2 Color Changer
Post by: davo88 on April 26, 2022, 03:42:59 PM
Shades
Thank you for the code. It worked fine.
Could you tell me what is the source of the !important tag? Was it implemented by SMF or Curve2 Color Changer?

@rjen
Quote from: @rjenI misread your request.
No problem. You showed me how to modify the forum titles, another small change I would like to make.
Quote from: @rjen...that bit of css will affect h3.catbg elements in other places in the forum as well.
I see it changes the color of other similar headings that use a full width blue band - samples below. Are these the sort of elements you are referring to?
2022-04-27 - Screenshot.png

2022-04-27 - Screenshot 002.png

IamTheBoy
I haven't seen the error you mention on either of the two test sites I am using - an unmodified site and a site using Curve2 Color Changer.
Could you tell me when the error occurs please?
Title: Re: Curve2 Color Changer
Post by: Arantor on April 26, 2022, 03:44:04 PM
!important is standard CSS, it means 'use this rule in preference to other rules'.
Title: Re: Curve2 Color Changer
Post by: Diego Andrés on April 26, 2022, 03:47:10 PM
Yes, it's not needed for this specific situation. Not sure where Shades got that change from, it will not affect anything having it or dropping it since the mod (or any other I've seen) doesn't change it as it's been pointed out.
Title: Re: Curve2 Color Changer
Post by: IamTheBoy on April 27, 2022, 04:47:12 AM
Quote from: IamTheBoy on April 26, 2022, 10:03:15 AMLooks to be just the mod I need, thanks!

However, getting an error that hints it may be due to this mod...


/var/www/html/forum/Sources/Class-ColorChanger.php (Line 264)
Type of error: Cron
Error messageSelect
8: Undefined index: theme_id


Is this from this mod, or do I need to post this in 2.1 Support?


Cheers
I've narrowed it down to when a user does an export of their profile.

If the option to include posts or PMs is not checked, it seems to just do it once. If they tick either of those options, it seems to do it repeatedly (maybe once per message?)
Title: Re: Curve2 Color Changer
Post by: Shades. on April 30, 2022, 05:10:33 AM
Quote from: Diego Andrés on April 26, 2022, 03:47:10 PMYes, it's not needed for this specific situation. Not sure where Shades got that change from, it will not affect anything having it or dropping it since the mod (or any other I've seen) doesn't change it as it's been pointed out.
Sorry I haven't used this mod since RC4... but it was a solution that worked for me that was shared with me(can't find or remember where) but it worked! I wasn't sure if that part of the code needed the !important part or not or even if the color changer mod affected that area or not! Was just a mere suggestion! If it worked, cool! 8) Otherwise  listen to @Diego Andrés he know his stuff! 8)
Title: Re: Curve2 Color Changer
Post by: davo88 on April 30, 2022, 04:48:29 PM
This subject may have already been discussed starting back here at post #80 (https://www.simplemachines.org/community/index.php?msg=4117380). But no matter how many times I read it, I don't really understand it and am not sure of the conclusion.
So my apologies to everyone if I am asking a question that has already been answered.

Having worked up a nice set of colors using Curve2 Color Changer (thank you Diego), is there a way I can copy that set of colors from one installation of SMF 2.1.1 to another separate stock standard installation of SMF 2.1.1 which has no modifications to the default theme?
Title: Re: Curve2 Color Changer
Post by: Loshmi on May 12, 2022, 03:25:31 AM
Did anyone tested it on 2.1.2? Is it working?
Thanks in advance for the reply!
Title: Re: Curve2 Color Changer
Post by: Diego Andrés on May 12, 2022, 07:21:43 AM
Yes it should
Title: Re: Curve2 Color Changer
Post by: shawnb61 on May 23, 2022, 09:33:27 PM
Quote from: IamTheBoy on April 27, 2022, 04:47:12 AM
Quote from: IamTheBoy on April 26, 2022, 10:03:15 AM/var/www/html/forum/Sources/Class-ColorChanger.php (Line 264)
Type of error: Cron
Error messageSelect
8: Undefined index: theme_id
I've narrowed it down to when a user does an export of their profile.

If the option to include posts or PMs is not checked, it seems to just do it once. If they tick either of those options, it seems to do it repeatedly (maybe once per message?)

That's a bug.  I see it also.  Logged internally.
Title: Re: Curve2 Color Changer
Post by: shawnb61 on May 23, 2022, 09:48:10 PM
I have been playing around with this mod also - working on a dark theme for our site. 

I see folks have asked how to use this in multiple copies of curve2.  I've been able to do this by following these 2 steps:


// No palettes...
addJavaScriptVar('txt_cc_palettes', false);

// Copy settings template over from color changer mod...
$settings['color_changes'] = array(
'background' => array(
array(
'elements' => 'body',
'properties' => array('background')
)
),
'foreground' => array(
array(
'elements' => 'body, strong, .strong, h1, h2, h3, h4, h5, h6, h3.titlebg, h4.titlebg, .titlebg, h3.subbg, h4.subbg, .subbg,
#detailedinfo dt, #tracking dt, .approvebg',
'properties' => array('color')
)
),
'primary_color' => array(
array(
'elements' => 'div.cat_bar, .amt, .dropmenu li a:hover, .dropmenu li:hover a, .dropmenu li a:focus,
#top_info > li > a:hover, #top_info > li:hover > a, #top_info > li > a.open, .button.active, .button.active:hover',
'properties' => array('background', 'border-color')
),
array(
'elements' => '#footer',
'properties' => array('background')
),
array(
'elements' => '.button.active, .button.active:hover',
'properties' => array('color' => '#fff')
)
),
'secondary_color' => array(
array(
'elements' => '.title_bar',
'properties' => array('border-top-color', 'border-bottom-color')
),
array(
'elements' => '.dropmenu li a.active, #top_info li a.active, .dropmenu li a.active:hover, .dropmenu li:hover a.active, a.moderation_link,
a.moderation_link:visited, .new_posts, .generic_bar .bar, .progress_bar .bar',
'properties' => array('background', 'border-color')
)
),
'links' => array(
array(
'elements' => 'a, a:visited, .dropmenu li:hover li a, .dropmenu li li a, .button, .quickbuttons li, .quickbuttons li a,
.quickbuttons li:hover a, .titlebg a, .subbg a, .quickbuttons li ul li a:hover',
'properties' => array('color')
)
),
'gradient_end' => array(
array(
'elements' => '#wrapper, .dropmenu li ul, .top_menu, .dropmenu li li:hover, .button, .dropmenu li li:hover > a, .dropmenu li li a:focus,
.dropmenu li li a:hover, #top_section, #search_form .button, .quickbuttons li, .quickbuttons li ul, .quickbuttons li ul li:hover,
.quickbuttons ul li a:focus, .popup_window, #inner_section, .button:hover, .quickbuttons li:hover, .navigate_section ul, .popup_content, .up_contain,
.button:focus, #search_form .button:hover, .quickbuttons li:hover',
'properties' => array('background')
)
),
'gradient_start' => array(
array(
'elements' => '.dropmenu li ul, .top_menu, .dropmenu li li:hover, .button, .dropmenu li li:hover > a, .dropmenu li li a:focus,
.dropmenu li li a:hover, #top_section, #search_form .button, .quickbuttons li, .quickbuttons li ul, .quickbuttons li ul li:hover,
.quickbuttons ul li a:focus, .popup_window, #inner_section',
'properties' => array('background-image' => 'linear-gradient(to bottom, {color} 0%, transparent 70%)')
),
array(
'elements' => '.button:hover, .button:focus, .quickbuttons li:hover, .navigate_section ul, .popup_content, .up_contain,
#search_form .button:hover, .quickbuttons li:hover',
'properties' => array('background-image' => 'linear-gradient(to bottom, transparent 0%, {color} 70%)')
)
),
'blocks_color' => array(
array(
'elements' => '.windowbg:nth-of-type(even), .bg.even, .information, .roundframe, .generic_list_wrapper, .approvebg,
.windowbg:nth-of-type(odd) blockquote, .windowbg:nth-of-type(even) .bbc_alternate_quote',
'properties' => array('background')
)
),
'blocks_alternate_color' => array(
array(
'elements' => '.windowbg:nth-of-type(odd), .bg.odd, .unread_notify:hover, .title_bar, tr.windowbg:hover,
.windowbg:nth-of-type(even) blockquote, .windowbg:nth-of-type(odd) .bbc_alternate_quote, .bbc_code',
'properties' => array('background')
)
),
'content_target_bg' => array(
array(
'elements' => '.windowbg:target',
'properties' => array('background')
),
),
'borders_color' => array(
array(
'elements' => '#wrapper, .button, .button:hover, .button:focus, .windowbg, .roundframe, .information, #top_section, .navigate_section ul, .dropmenu li ul, .top_menu,
.unread_notify, .pm_unread, .alerts_unread, .dropmenu li li:hover > a, .dropmenu li li a:focus, .dropmenu li li a:hover, .up_contain,
.boardindex_table .board_stats p, .children, #ic_recentposts td, .sub_bar, #info_center .sub_bar, .generic_bar, .progress_bar,
#detailedinfo dl, #tracking dl, .inner, .signature, .attachments, .under_message, .custom_fields_above_signature, .custom_fields_below_signature,
.quickbuttons li, .quickbuttons li:hover, .quickbuttons li ul, .quickbuttons li ul li:hover, .action_admin .table_grid td, .generic_list_wrapper,
#topic_container .windowbg, #topic_icons .information, #messageindex .information, .approvebg, .popup_content, fieldset, #alerts tr.windowbg td,
blockquote, #manage_boards li.windowbg, #manage_boards li.windowbg:last-child, #footer, .bbc_code, #inner_wrap',
'properties' => array('border-color')
),
array(
'elements' => '.title_bar',
'properties' => array('border-left-color', 'border-right-color')
),
array(
'elements' => 'hr',
'properties' => array('background', 'border-color')
)
),
'top_section' => array(
array(
'elements' => '#top_section',
'properties' => array('background')
)
),
'footer' => array(
array(
'elements' => '#footer',
'properties' => array('background')
)
),
'buttons_text_color' => array(
array(
'elements' => 'a.button, .button, .quickbuttons li a, .button:hover, .button:focus, .quickbuttons li:hover>a, .quickbuttons li:hover li a',
'properties' => array('color')
),
),
'buttons_bg' => array(
array(
'elements' => '.button, .quickbuttons li, .button:hover, .button:focus, .quickbuttons li:hover, #search_form .button, #search_form .button:hover',
'properties' => array('background')
)
),
'buttons_border' => array(
array(
'elements' => '.button, .quickbuttons li, .button:hover, .button:focus, .quickbuttons li:hover, #search_form .button, #search_form .button:hover',
'properties' => array('border-color')
)
),
'special_titles_color' => array(
array(
'elements' => '.info .subject, h1.forumtitle a, .poster h4, .poster h4 a, .poster li:hover h4 a, .poster h4 a:hover .poster li h4 a,
.poster h4 a:focus, #smfAnnouncements dt a, .keyinfo h5 a, .keyinfo h5 a strong, .current_page',
'properties' => array('color')
),
array(
'elements' => '#smfAnnouncements dt',
'properties' => array('border-color')
)
),
'sticky_topic' => array(
array(
'elements' => '.windowbg.sticky',
'properties' => array('background')
),
),
'sticky_locked_topic' => array(
array(
'elements' => '.windowbg.sticky.locked',
'properties' => array('background')
)
),
'unapproved_topic' => array(
array(
'elements' => '.windowbg.approvetopic, .windowbg.approvepost, .approvebg',
'properties' => array('background')
)
),
'locked_topic' => array(
array(
'elements' => '.windowbg.locked',
'properties' => array('background')
)
),
'remove_shadows' => array(
array(
'elements' => '*',
'properties' => array('box-shadow' => 'none !important', 'text-shadow' => 'none !important')
)
)
);

This is basically creating a custom theme with the same controls as this mod.  The code above is a slightly modified version of code in buildCss(), following the instructions provided in the mod description.  If buildCss ever changes, what is copied here would need to change, too. 

Title: Re: Curve2 Color Changer
Post by: shawnb61 on May 23, 2022, 10:09:20 PM
It would be nice to adjust text backgrounds, too, especially for working on a dark mode color set.  There are a lot of #FFF values throughout the .css.  Bright hot white... They hit you like a searchlight coming out of your smartphone in the dark...
Title: Re: Curve2 Color Changer
Post by: shawnb61 on May 29, 2022, 11:32:46 AM
I now have a dark mode theme for my site.  This was accomplished almost exclusively with this mod, plus a couple minor .css tweaks and a change to the main template (mainly to support the full width banner).

*** EDIT: ...using a highly modified version of the $settings['color_changes'] array, shown in the above post.  Every time I found some rando color I wanted under control of the color changer, I added the corresponding element to the 'elements' list of my intended color in $settings['color_changes']. 

https://www.vguitarforums.com/smf/index.php?theme=2

vgf-home.png

vgf-board.png

vgf-post.png 
Title: Re: Curve2 Color Changer
Post by: Steve on May 29, 2022, 12:08:01 PM
Nice!  :)
Title: Re: Curve2 Color Changer
Post by: davo88 on May 29, 2022, 03:40:02 PM
Quote from: shawnb61....how to use this in multiple copies of curve2...
Thank you shawnb61 for posting the above guide.
Title: Re: Curve2 Color Changer
Post by: Recursos on October 15, 2022, 07:27:26 AM
After installing the mod, error log shows 44 similar errors:

44 8: Undefined index: cc_remove_shadows
43 8: Undefined index: cc_locked_topic
....
 1 8: Undefined index: cc_background

is this serious?
Title: Re: Curve2 Color Changer
Post by: Diego Andrés on October 15, 2022, 09:06:23 AM
Are you using the default theme?
Title: Re: Curve2 Color Changer
Post by: Diego Andrés on October 15, 2022, 11:55:21 AM
Version 1.4.2 - 15 October 2022
- Fixed undefined errors when no settings are saved
Title: Re: Curve2 Color Changer
Post by: Recursos on October 16, 2022, 04:45:45 AM
Deleted error log.
Uninstalled "Curve2 Color Changer v1.4.1"
Installed "Curve2 Color Changer v1.4.2"
No errors now.
Was it related?
Title: Re: Curve2 Color Changer
Post by: Diego Andrés on October 16, 2022, 10:05:56 AM
Yes, fixed issues.
Thanks for the report.
Title: Re: Curve2 Color Changer
Post by: Recursos on October 16, 2022, 11:43:15 AM
Is there a way to export the edited color scheme and reuse it in another theme?
Title: Re: Curve2 Color Changer
Post by: Diego Andrés on October 16, 2022, 11:53:31 AM
It's not an option at the moment.
Title: Re: Curve2 Color Changer
Post by: shawnb61 on October 16, 2022, 03:13:46 PM
Quote from: Recursos on October 16, 2022, 11:43:15 AMIs there a way to export the edited color scheme and reuse it in another theme?

You can use a sql tool to do so though.  Query the parameters in a tool like phpmyadmin.  Export them.  Edit the .sql (theme_id likely needs changing).  Import edited file where needed.

This may be of help also - instructions how to use this mod on themes other than the default:
https://www.simplemachines.org/community/index.php?msg=4126149

Title: Re: Curve2 Color Changer
Post by: Recursos on October 17, 2022, 02:10:22 PM
Quote from: shawnb61 on October 16, 2022, 03:13:46 PM(...) instructions how to use this mod on themes other than the default:
https://www.simplemachines.org/community/index.php?msg=4126149

I noticed that "Ready for use color palettes:" (bottom of "Theme Options and Preferences" page) is not displayed after adding the code.
Is it like that, or some mistake of mine?
Title: Re: Curve2 Color Changer
Post by: Recursos on October 17, 2022, 02:13:13 PM
Forget, I just noticed:
"
   // No palettes...
   addJavaScriptVar('txt_cc_palettes', false);
"
Why not keep the palettes?
Title: Re: Curve2 Color Changer
Post by: Diego Andrés on October 17, 2022, 02:27:06 PM
They are per theme too, can't know what colors a theme would provide as options for the color changer.

You'd have to copy the palettes too, or create your own palettes that fit the theme.
Title: Re: Curve2 Color Changer
Post by: kingkingston on October 18, 2022, 01:11:42 PM
This might be the greatest mod ever for someone who just wants an easy way to change his forum's colours
Title: Curve2 Color Changer - Update
Post by: Rheingauner on October 26, 2022, 08:40:32 AM
Is it possible to manually update from version 1.4.1 to 1.4.2 without uninstalling the 1.4.1 version ??

regards
Title: Re: Curve2 Color Changer
Post by: Diego Andrés on October 26, 2022, 08:45:24 AM
Just check the commits from the GitHub repo: https://github.com/SimpleMachines/SMF-mods/pull/25
That's the relevant PR.

I don't really see why you'd do it manually, mod uses hooks so uninstalling/installing will not give you any issues.
Title: Re: Curve2 Color Changer
Post by: Recursos on November 07, 2022, 01:57:33 PM
About Palletes:
Quote from: Diego Andrés on October 17, 2022, 02:27:06 PMThey are per theme too, can't know what colors a theme would provide as options for the color changer.

But if the Theme to be modded with "Curve2 Color Changer" is just a copy of "SMF Default Theme - Curve2", is there any easy way to heep palletes alive?
Title: Re: Curve2 Color Changer
Post by: Lazybones on December 23, 2022, 03:02:20 AM
- Any chance this mod could support prefers-color-scheme: dark and let the admin set a color theme for light and dark preferences? Most browsers and OS now support auto dark mode changing, it would be great to have the forum follow the users preference.
- I tried using the "Create a copy of Default named" feature so that I could have a different color set for users to chose however the copy did not have the mods color option.
Title: Re: Curve2 Color Changer
Post by: Recursos on January 03, 2023, 08:13:27 AM
Quote from: Lazybones on December 23, 2022, 03:02:20 AM- I tried using the "Create a copy of Default named" feature so that I could have a different color set for users to chose however the copy did not have the mods color option.
have a look at post #112 (https://www.simplemachines.org/community/index.php?msg=4126149) in this topic
Title: Re: Curve2 Color Changer
Post by: Viper013 on January 29, 2023, 11:29:20 AM
Hi,

maybe someone have a idea to solve my little problem  :)

With the options "Blocks color" and "Blocks alternate color" i have now different colors for my posts. (post.jpg)
Thats whan i want  :)

But it changes the colors for the category_index as well. (cat_index.jpg)
Thats is not what i want.  :(

How can i change colors only for the category_index.
I want only one color for the index.

Thanks for your help.
Title: Re: Curve2 Color Changer
Post by: Gryzor on March 17, 2023, 05:12:30 AM
Quote from: shawnb61 on May 23, 2022, 09:48:10 PMI have been playing around with this mod also - working on a dark theme for our site. 

I see folks have asked how to use this in multiple copies of curve2.  I've been able to do this by following these 2 steps:

  • Make a copy of curve2 in the acp via "Install a new theme", "Create a copy of Default ".
  • Add the following code to the bottom of template_init() in index.template.php in your new copy:

// No palettes...
addJavaScriptVar('txt_cc_palettes', false);

// Copy settings template over from color changer mod...
$settings['color_changes'] = array(
'background' => array(
array(
'elements' => 'body',
'properties' => array('background')
)
),
'foreground' => array(
array(
'elements' => 'body, strong, .strong, h1, h2, h3, h4, h5, h6, h3.titlebg, h4.titlebg, .titlebg, h3.subbg, h4.subbg, .subbg,
#detailedinfo dt, #tracking dt, .approvebg',
'properties' => array('color')
)
),
'primary_color' => array(
array(
'elements' => 'div.cat_bar, .amt, .dropmenu li a:hover, .dropmenu li:hover a, .dropmenu li a:focus,
#top_info > li > a:hover, #top_info > li:hover > a, #top_info > li > a.open, .button.active, .button.active:hover',
'properties' => array('background', 'border-color')
),
array(
'elements' => '#footer',
'properties' => array('background')
),
array(
'elements' => '.button.active, .button.active:hover',
'properties' => array('color' => '#fff')
)
),
'secondary_color' => array(
array(
'elements' => '.title_bar',
'properties' => array('border-top-color', 'border-bottom-color')
),
array(
'elements' => '.dropmenu li a.active, #top_info li a.active, .dropmenu li a.active:hover, .dropmenu li:hover a.active, a.moderation_link,
a.moderation_link:visited, .new_posts, .generic_bar .bar, .progress_bar .bar',
'properties' => array('background', 'border-color')
)
),
'links' => array(
array(
'elements' => 'a, a:visited, .dropmenu li:hover li a, .dropmenu li li a, .button, .quickbuttons li, .quickbuttons li a,
.quickbuttons li:hover a, .titlebg a, .subbg a, .quickbuttons li ul li a:hover',
'properties' => array('color')
)
),
'gradient_end' => array(
array(
'elements' => '#wrapper, .dropmenu li ul, .top_menu, .dropmenu li li:hover, .button, .dropmenu li li:hover > a, .dropmenu li li a:focus,
.dropmenu li li a:hover, #top_section, #search_form .button, .quickbuttons li, .quickbuttons li ul, .quickbuttons li ul li:hover,
.quickbuttons ul li a:focus, .popup_window, #inner_section, .button:hover, .quickbuttons li:hover, .navigate_section ul, .popup_content, .up_contain,
.button:focus, #search_form .button:hover, .quickbuttons li:hover',
'properties' => array('background')
)
),
'gradient_start' => array(
array(
'elements' => '.dropmenu li ul, .top_menu, .dropmenu li li:hover, .button, .dropmenu li li:hover > a, .dropmenu li li a:focus,
.dropmenu li li a:hover, #top_section, #search_form .button, .quickbuttons li, .quickbuttons li ul, .quickbuttons li ul li:hover,
.quickbuttons ul li a:focus, .popup_window, #inner_section',
'properties' => array('background-image' => 'linear-gradient(to bottom, {color} 0%, transparent 70%)')
),
array(
'elements' => '.button:hover, .button:focus, .quickbuttons li:hover, .navigate_section ul, .popup_content, .up_contain,
#search_form .button:hover, .quickbuttons li:hover',
'properties' => array('background-image' => 'linear-gradient(to bottom, transparent 0%, {color} 70%)')
)
),
'blocks_color' => array(
array(
'elements' => '.windowbg:nth-of-type(even), .bg.even, .information, .roundframe, .generic_list_wrapper, .approvebg,
.windowbg:nth-of-type(odd) blockquote, .windowbg:nth-of-type(even) .bbc_alternate_quote',
'properties' => array('background')
)
),
'blocks_alternate_color' => array(
array(
'elements' => '.windowbg:nth-of-type(odd), .bg.odd, .unread_notify:hover, .title_bar, tr.windowbg:hover,
.windowbg:nth-of-type(even) blockquote, .windowbg:nth-of-type(odd) .bbc_alternate_quote, .bbc_code',
'properties' => array('background')
)
),
'content_target_bg' => array(
array(
'elements' => '.windowbg:target',
'properties' => array('background')
),
),
'borders_color' => array(
array(
'elements' => '#wrapper, .button, .button:hover, .button:focus, .windowbg, .roundframe, .information, #top_section, .navigate_section ul, .dropmenu li ul, .top_menu,
.unread_notify, .pm_unread, .alerts_unread, .dropmenu li li:hover > a, .dropmenu li li a:focus, .dropmenu li li a:hover, .up_contain,
.boardindex_table .board_stats p, .children, #ic_recentposts td, .sub_bar, #info_center .sub_bar, .generic_bar, .progress_bar,
#detailedinfo dl, #tracking dl, .inner, .signature, .attachments, .under_message, .custom_fields_above_signature, .custom_fields_below_signature,
.quickbuttons li, .quickbuttons li:hover, .quickbuttons li ul, .quickbuttons li ul li:hover, .action_admin .table_grid td, .generic_list_wrapper,
#topic_container .windowbg, #topic_icons .information, #messageindex .information, .approvebg, .popup_content, fieldset, #alerts tr.windowbg td,
blockquote, #manage_boards li.windowbg, #manage_boards li.windowbg:last-child, #footer, .bbc_code, #inner_wrap',
'properties' => array('border-color')
),
array(
'elements' => '.title_bar',
'properties' => array('border-left-color', 'border-right-color')
),
array(
'elements' => 'hr',
'properties' => array('background', 'border-color')
)
),
'top_section' => array(
array(
'elements' => '#top_section',
'properties' => array('background')
)
),
'footer' => array(
array(
'elements' => '#footer',
'properties' => array('background')
)
),
'buttons_text_color' => array(
array(
'elements' => 'a.button, .button, .quickbuttons li a, .button:hover, .button:focus, .quickbuttons li:hover>a, .quickbuttons li:hover li a',
'properties' => array('color')
),
),
'buttons_bg' => array(
array(
'elements' => '.button, .quickbuttons li, .button:hover, .button:focus, .quickbuttons li:hover, #search_form .button, #search_form .button:hover',
'properties' => array('background')
)
),
'buttons_border' => array(
array(
'elements' => '.button, .quickbuttons li, .button:hover, .button:focus, .quickbuttons li:hover, #search_form .button, #search_form .button:hover',
'properties' => array('border-color')
)
),
'special_titles_color' => array(
array(
'elements' => '.info .subject, h1.forumtitle a, .poster h4, .poster h4 a, .poster li:hover h4 a, .poster h4 a:hover .poster li h4 a,
.poster h4 a:focus, #smfAnnouncements dt a, .keyinfo h5 a, .keyinfo h5 a strong, .current_page',
'properties' => array('color')
),
array(
'elements' => '#smfAnnouncements dt',
'properties' => array('border-color')
)
),
'sticky_topic' => array(
array(
'elements' => '.windowbg.sticky',
'properties' => array('background')
),
),
'sticky_locked_topic' => array(
array(
'elements' => '.windowbg.sticky.locked',
'properties' => array('background')
)
),
'unapproved_topic' => array(
array(
'elements' => '.windowbg.approvetopic, .windowbg.approvepost, .approvebg',
'properties' => array('background')
)
),
'locked_topic' => array(
array(
'elements' => '.windowbg.locked',
'properties' => array('background')
)
),
'remove_shadows' => array(
array(
'elements' => '*',
'properties' => array('box-shadow' => 'none !important', 'text-shadow' => 'none !important')
)
)
);

This is basically creating a custom theme with the same controls as this mod.  The code above is a slightly modified version of code in buildCss(), following the instructions provided in the mod description.  If buildCss ever changes, what is copied here would need to change, too. 


Hmmm I copied the code to the bottom of template_init() (just before the closing '}') but the mod doesn't appear on my copy of default... any ideas?

[EDIT] Darn, apologies, it worked after a couple of reloads. However, the palette choice at the bottom does not appear. Does it need an update perhaps?
Title: Re: Curve2 Color Changer
Post by: Diego Andrés on March 17, 2023, 10:44:56 AM
Quote from: Gryzor on March 17, 2023, 05:12:30 AM[EDIT] Darn, apologies, it worked after a couple of reloads. However, the palette choice at the bottom does not appear. Does it need an update perhaps?

You also need to create the palettes.
Realistically, it's not useful if it's for your own personal use. Mostly useful if sharing the theme with others.

To add palettes, you need to add another variable.
$settings['color_palettes'] and add arrays with each palette.

E.g. An example with a default palette of the mod:
$settings['color_palettes']['flat'] = array(
'primary_color'          => '#24292e',
'secondary_color'        => '#0366d6',
'background'             => '#f6f8fa',
'foreground'             => '#000000',
'top_section'            => '#ffffff',
'footer'                 => '#24292e',
'links'                  => '#334466',
'gradient_start'         => '#ffffff',
'gradient_end'           => '#ffffff',
'blocks_color'           => '#f6f8fa',
'blocks_alternate_color' => '#f6f8fa',
'content_target_bg'     => '#e0edff',
'special_titles_color'   => '#24292e',
'borders_color'          => '#d1d6dc',
'buttons_text_color'     => '#24292e',
'buttons_bg'             => '#ffffff',
'buttons_border'         => '#24292e',
'sticky_topic'             => '#cad7e3',
'sticky_locked_topic'          => '#a0acb8',
'unapproved_topic'     => '#db9d7b',
'locked_topic'          => '#dcdfe3',
'remove_shadows'         => true,
);
Title: Re: Curve2 Color Changer
Post by: CraftyLion on November 25, 2023, 10:47:15 PM
How does one change the category colour? At the moment, it's stuck on white and I can't seem to change it ...  ???
Title: Re: Curve2 Color Changer
Post by: Diego Andrés on November 26, 2023, 12:05:02 AM
It's tied to the primary color (I think), you'll need to change it or tweak the css if you need it white.
Title: Re: Curve2 Color Changer
Post by: CraftyLion on November 26, 2023, 12:25:28 AM
Sorry, I meant the category text colour - not the background colour.
Title: Re: Curve2 Color Changer
Post by: Diego Andrés on November 26, 2023, 02:06:34 AM
It's not part of the palettes, you'll have to edit the index.css file of the theme.
h3.catbg, h3.catbg a, h3.catbg a:hover {
color: #fff;
}
Title: Re: Curve2 Color Changer
Post by: Steffi2006 on January 01, 2024, 06:22:11 PM
Hi!

Will there be a new version for sms 2.1.4.?

Thanks,
Steffi
Title: Re: Curve2 Color Changer
Post by: Diego Andrés on January 01, 2024, 09:25:33 PM
Current version works with 2.1.4
Title: Re: Curve2 Color Changer
Post by: Steffi2006 on January 04, 2024, 04:29:47 PM
Hm okay... my fresh installed SMF 2.1.4. broke after using the modification. I installed it with the packet manager and after that I have an totally white site.
Title: Re: Curve2 Color Changer
Post by: Diego Andrés on January 04, 2024, 07:57:31 PM
I can't reproduce your issue.
Could you check you server error log? Likely you'll find information about what went wrong.
Title: Re: Curve2 Color Changer
Post by: samozin on January 31, 2024, 03:11:25 PM
Quote from: shawnb61 on May 23, 2022, 09:48:10 PMI have been playing around with this mod also - working on a dark theme for our site. 

I see folks have asked how to use this in multiple copies of curve2.  I've been able to do this by following these 2 steps:

  • Make a copy of curve2 in the acp via "Install a new theme", "Create a copy of Default ".
  • Add the following code to the bottom of template_init() in index.template.php in your new copy:


    $settings['color_changes'] = array(
        'background' => array(
            array(
                'elements' => 'body',
                'properties' => array('background')
            )
        ),
        'foreground' => array(
            array(
                'elements' => 'body, strong, .strong, h1, h2, h3, h4, h5, h6, h3.titlebg, h4.titlebg, .titlebg, h3.subbg, h4.subbg, .subbg,
                #detailedinfo dt, #tracking dt, .approvebg',
                'properties' => array('color')
            )
        ),
        'primary_color' => array(
            array(
                'elements' => 'div.cat_bar, .amt, .dropmenu li a:hover, .dropmenu li:hover a, .dropmenu li a:focus,
                #top_info > li > a:hover, #top_info > li:hover > a, #top_info > li > a.open, .button.active, .button.active:hover',
                'properties' => array('background', 'border-color')
            ),
            array(
                'elements' => '#footer',
                'properties' => array('background')
            ),
            array(
                'elements' => '.button.active, .button.active:hover',
                'properties' => array('color' => '#fff')
            )
        ),
        'secondary_color' => array(
            array(
                'elements' => '.title_bar',
                'properties' => array('border-top-color', 'border-bottom-color')
            ),
            array(
                'elements' => '.dropmenu li a.active, #top_info li a.active, .dropmenu li a.active:hover, .dropmenu li:hover a.active, a.moderation_link,
                a.moderation_link:visited, .new_posts, .generic_bar .bar, .progress_bar .bar',
                'properties' => array('background', 'border-color')
            )
        ),
        'links' => array(
            array(
                'elements' => 'a, a:visited, .dropmenu li:hover li a, .dropmenu li li a, .button, .quickbuttons li, .quickbuttons li a,
                .quickbuttons li:hover a, .titlebg a, .subbg a, .quickbuttons li ul li a:hover',
                'properties' => array('color')
            )
        ),
        'gradient_end' => array(
            array(
                'elements' => '#wrapper, .dropmenu li ul, .top_menu, .dropmenu li li:hover, .button, .dropmenu li li:hover > a, .dropmenu li li a:focus,
                .dropmenu li li a:hover, #top_section, #search_form .button, .quickbuttons li, .quickbuttons li ul, .quickbuttons li ul li:hover,
                .quickbuttons ul li a:focus, .popup_window, #inner_section, .button:hover, .quickbuttons li:hover, .navigate_section ul, .popup_content, .up_contain,
                .button:focus, #search_form .button:hover, .quickbuttons li:hover',
                'properties' => array('background')
            )
        ),
        'gradient_start' => array(
            array(
                'elements' => '.dropmenu li ul, .top_menu, .dropmenu li li:hover, .button, .dropmenu li li:hover > a, .dropmenu li li a:focus,
                .dropmenu li li a:hover, #top_section, #search_form .button, .quickbuttons li, .quickbuttons li ul, .quickbuttons li ul li:hover,
                .quickbuttons ul li a:focus, .popup_window, #inner_section',
                'properties' => array('background-image' => 'linear-gradient(to bottom, {color} 0%, transparent 70%)')
            ),
            array(
                'elements' => '.button:hover, .button:focus, .quickbuttons li:hover, .navigate_section ul, .popup_content, .up_contain,
                #search_form .button:hover, .quickbuttons li:hover',
                'properties' => array('background-image' => 'linear-gradient(to bottom, transparent 0%, {color} 70%)')
            )
        ),
        'blocks_color' => array(
            array(
                'elements' => '.windowbg:nth-of-type(even), .bg.even, .information, .roundframe, .generic_list_wrapper, .approvebg,
                .windowbg:nth-of-type(odd) blockquote, .windowbg:nth-of-type(even) .bbc_alternate_quote',
                'properties' => array('background')
            )
        ),
        'blocks_alternate_color' => array(
            array(
                'elements' => '.windowbg:nth-of-type(odd), .bg.odd, .unread_notify:hover, .title_bar, tr.windowbg:hover,
                .windowbg:nth-of-type(even) blockquote, .windowbg:nth-of-type(odd) .bbc_alternate_quote, .bbc_code',
                'properties' => array('background')
            )
        ),
        'content_target_bg' => array(
            array(
                'elements' => '.windowbg:target',
                'properties' => array('background')
            ),
        ),
        'borders_color' => array(
            array(
                'elements' => '#wrapper, .button, .button:hover, .button:focus, .windowbg, .roundframe, .information, #top_section, .navigate_section ul, .dropmenu li ul, .top_menu,
                .unread_notify, .pm_unread, .alerts_unread, .dropmenu li li:hover > a, .dropmenu li li a:focus, .dropmenu li li a:hover, .up_contain,
                .boardindex_table .board_stats p, .children, #ic_recentposts td, .sub_bar, #info_center .sub_bar, .generic_bar, .progress_bar,
                #detailedinfo dl, #tracking dl, .inner, .signature, .attachments, .under_message, .custom_fields_above_signature, .custom_fields_below_signature,
                .quickbuttons li, .quickbuttons li:hover, .quickbuttons li ul, .quickbuttons li ul li:hover, .action_admin .table_grid td, .generic_list_wrapper,
                #topic_container .windowbg, #topic_icons .information, #messageindex .information, .approvebg, .popup_content, fieldset, #alerts tr.windowbg td,
                blockquote, #manage_boards li.windowbg, #manage_boards li.windowbg:last-child, #footer, .bbc_code, #inner_wrap',
                'properties' => array('border-color')
            ),
            array(
                'elements' => '.title_bar',
                'properties' => array('border-left-color', 'border-right-color')
            ),
            array(
                'elements' => 'hr',
                'properties' => array('background', 'border-color')
            )
        ),
        'top_section' => array(
            array(
                'elements' => '#top_section',
                'properties' => array('background')
            )
        ),
        'footer' => array(
            array(
                'elements' => '#footer',
                'properties' => array('background')
            )
        ),
        'buttons_text_color' => array(
            array(
                'elements' => 'a.button, .button, .quickbuttons li a, .button:hover, .button:focus, .quickbuttons li:hover>a, .quickbuttons li:hover li a',
                'properties' => array('color')
            ),
        ),
        'buttons_bg' => array(
            array(
                'elements' => '.button, .quickbuttons li, .button:hover, .button:focus, .quickbuttons li:hover, #search_form .button, #search_form .button:hover',
                'properties' => array('background')
            )
        ),
        'buttons_border' => array(
            array(
                'elements' => '.button, .quickbuttons li, .button:hover, .button:focus, .quickbuttons li:hover, #search_form .button, #search_form .button:hover',
                'properties' => array('border-color')
            )
        ),
        'special_titles_color' => array(
            array(
                'elements' => '.info .subject, h1.forumtitle a, .poster h4, .poster h4 a, .poster li:hover h4 a, .poster h4 a:hover .poster li h4 a,
                .poster h4 a:focus, #smfAnnouncements dt a, .keyinfo h5 a, .keyinfo h5 a strong, .current_page',
                'properties' => array('color')
            ),
            array(
                'elements' => '#smfAnnouncements dt',
                'properties' => array('border-color')
            )
        ),
        'sticky_topic' => array(
            array(
                'elements' => '.windowbg.sticky',
                'properties' => array('background')
            ),
        ),
        'sticky_locked_topic' => array(
            array(
                'elements' => '.windowbg.sticky.locked',
                'properties' => array('background')
            )
        ),
        'unapproved_topic' => array(
            array(
                'elements' => '.windowbg.approvetopic, .windowbg.approvepost, .approvebg',
                'properties' => array('background')
            )
        ),
        'locked_topic' => array(
            array(
                'elements' => '.windowbg.locked',
                'properties' => array('background')
            )
        ),
        'remove_shadows' => array(
            array(
                'elements' => '*',
                'properties' => array('box-shadow' => 'none !important', 'text-shadow' => 'none !important')
            )
        )
    );

This is basically creating a custom theme with the same controls as this mod.  The code above is a slightly modified version of code in buildCss(), following the instructions provided in the mod description.  If buildCss ever changes, what is copied here would need to change, too. 


yes that worked nicely with me with lit change  ... yes lets share colors ...
Title: Re: Curve2 Color Changer
Post by: Senkusha on March 18, 2024, 02:34:08 PM
Has anybody else created their own color palettes?  I'm curious to see what other people have created (since I'm slightly colorblind) I don't feel too confident creating my own.  However, I would like more options.