Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6817893
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:06:39+00:00 2026-05-26T21:06:39+00:00

How can I change the used color-profile in my Drupal install profile? I’ve installed

  • 0

How can I change the used color-profile in my Drupal install profile? I’ve installed the colors-module and I can configure under Appearance - Settings - *theme* my color-schema which results in a $info array with all the color values. But how can I place this in my install profile so it will be installed by default?

I have added a task in my install profile and linked to it this function. But obviously, there is something missing…

$tasks['_create_color']['display_name'] = 'Set the typical color on each platform';
$tasks['_create_color']['display'] = 0;

function _create_color() {
    $info = array(
    'schemes' => array(
    'default' => array(
      'title' => t('Blue Lagoon (default)'),
      'colors' => array(
        'top' => '#97279b',
        'bottom' => '#97279b',
        'footer' => '#97279b',
        'link' => '#97279b',
      )
    )));
}

Anyone with advice?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T21:06:39+00:00Added an answer on May 26, 2026 at 9:06 pm

    I found myself a perfect function to change the used color-profile!

    function _create_color() {
        $theme = 'bartik';
        $scheme  = 'firehouse';
    
        $fform = array();
        $fform_state = array();
    
        $fform_state['build_info']['args'][0] = $theme;
        $fform = system_theme_settings($fform, $fform_state, $theme);
    
        color_form_system_theme_settings_alter($fform, $fform_state);
    
        $fform_state['values']['theme'] = $theme;
        $fform_state['values']['info'] = color_get_info($theme);
        $fform_state['values']['palette'] = $fform_state['values']['info']['schemes'][$scheme]['colors'];
        $fform_state['values']['scheme'] = $scheme;
    
        color_scheme_form_submit($fform, $fform_state); 
    }
    

    Which does the trick when placed inside a task in the install profile.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can i change the appearance (not the color) of a scrollbar within a
How can I in change the table name using a query statement? I used
How i can change the color with gradient??? I have this now,but is different
How I can change the individual region background color of viewport extjs 4. Here
This code can change color of a UINavigationBar everywhere within the application. However, I
Can anyone tell me how I can change the color of my checkmark for
i have to change image color dynamically using php i used the following code
Using gtk3, how can I change the default GtkWindow titlebar color? Would it involve
I used this code to change the annotation's color,but after that,the title and subtitle
I can change SQL at runtime. Can I do the same with LINQ ?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.