Jeff -
I find that I need to override the color scheme for the Site Name (so it is different than --text--).

I could just hardcode it, but felt the better solution was to add an entry to the color scheme.

I have added an entry for sitename in color.inc for the field name and each of the color schemes; however, I'm not getting the info to show up on the corolla color scheme admin.

I've cleared the cache but there must be something else I'm missing.

Would appreciate your guidance and of course, i'd be glad to submit code change back to you for inclusion in corolla theme.

bekasu

Comments

Jeff Burnz’s picture

Attach your code or pastebin it.

bekasu’s picture

Here are the three files I've changed so far: (pastebin)

bekasu/corolla/css/fields.css

bekasu/corolla/color/colors.css

bekasu/corolla/color/color.inc

Jeff Burnz’s picture

Status: Active » Postponed (maintainer needs more info)

Show the CODE please.

bekasu’s picture

I'm not sure why you couldn't see the code in the pastebin files.
I'll attach all three files here:
color.inc

<?php
$info = array(
  'fields' => array(
    'base'            => t('Base'),
    'background'      => t('Background'),
		'sitename'        => t('Site Name'),
    'text'            => t('Text'),
    'link'            => t('Link'),
    'linkhover'       => t('Hovered Link'),
    'linkunderline'   => t('Link underline'),
    'slogan'          => t('Slogan'),
    'navigation'      => t('Navigation'),
    'navigationhover' => t('Navigation hover'),
    'tab'             => t('Tab'),
    'blocktitle'      => t('Block title'),
    'border'          => t('Border'),
    'borderstrong'    => t('Border strong'),
    'fieldset'        => t('Fieldset'),
    'fieldsetborder'  => t('Fieldset border'),
  ),
  'schemes' => array(
    'default' => array(
      'title' => t('Gray (Default)'),
      'colors' => array(
        'base'            => '#ffffff',
        'background'      => '#f8f8f8',
				'sitename'        => '#000000',
        'text'            => '#2e2e2e',
        'link'            => '#086782',
        'linkhover'       => '#e25401',
        'linkunderline'   => '#cfdde5',
        'slogan'          => '#e25400',
        'navigation'      => '#2e2e2d',
        'navigationhover' => '#e25402',
        'tab'             => '#f5f4f3',
        'blocktitle'      => '#779125',
        'border'          => '#e1e1e1',
        'borderstrong'    => '#c4c4c4',
        'fieldset'        => '#fbfbfb',
        'fieldsetborder'  => '#e1e1e2',
      ),
    ),
    'green1' => array(
      'title' => t('Green 1'),
      'colors' => array(
        'base'            => '#ffffff',
        'background'      => '#fbfbf6',
				'sitename'        => '#000000',
        'text'            => '#3d3d3d',
        'link'            => '#899833',
        'linkhover'       => '#e14601',
        'linkunderline'   => '#e3eac1',
        'slogan'          => '#899833',
        'navigation'      => '#8e9e35',
        'navigationhover' => '#626c25',
        'tab'             => '#fbfbf6',
        'blocktitle'      => '#738b25',
        'border'          => '#e7e1ce',
        'borderstrong'    => '#d2c8aa',
        'fieldset'        => '#fdfdfb',
        'fieldsetborder'  => '#dad6c9',
      ),
    ),
    'green2' => array(
      'title' => t('Green 2'),
      'colors' => array(
        'base'            => '#ffffff',
        'background'      => '#fbfbf6',
				'sitename'        => '#000000',
        'text'            => '#3d3d3d',
        'link'            => '#157a9c',
        'linkhover'       => '#e14601',
        'linkunderline'   => '#cfdde5',
        'slogan'          => '#e14601',
        'navigation'      => '#8e9e35',
        'navigationhover' => '#626c25',
        'tab'             => '#fbfbf6',
        'blocktitle'      => '#779125',
        'border'          => '#e7e1ce',
        'borderstrong'    => '#d2c8aa',
        'fieldset'        => '#fdfdfb',
        'fieldsetborder'  => '#dad6c9',
      ),
    ),
    'purple' => array(
      'title' => t('Purple'),
      'colors' => array(
        'base'            => '#ffffff',
        'background'      => '#fefafb',
  			'sitename'        => '#000000',
        'text'            => '#2e2e2e',
        'link'            => '#6c0d28',
        'linkhover'       => '#e25401',
        'linkunderline'   => '#eac8d1',
        'slogan'          => '#e25401',
        'navigation'      => '#6c0d28',
        'navigationhover' => '#83a80e',
        'tab'             => '#fbf3f6',
        'blocktitle'      => '#e25401',
        'border'          => '#f7d6e2',
        'borderstrong'    => '#d9a3b7',
        'fieldset'        => '#fefafb',
        'fieldsetborder'  => '#f7d6e2',
      ),
    ),
    'red' => array(
      'title' => t('Red'),
      'colors' => array(
        'base'            => '#ffffff',
        'background'      => '#fefbfa',
				'sitename'        => '#000000',
        'text'            => '#2e2e2e',
        'link'            => '#b9400e',
        'linkhover'       => '#ef762f',
        'linkunderline'   => '#faded3',
        'slogan'          => '#ca592b',
        'navigation'      => '#b9400e',
        'navigationhover' => '#7e2c0a',
        'tab'             => '#fdf6f4',
        'blocktitle'      => '#b9400e',
        'border'          => '#e8dad5',
        'borderstrong'    => '#e2bdae',
        'fieldset'        => '#fefbfa',
        'fieldsetborder'  => '#f7dad6',
      ),
    ),
    'yellow' => array(
      'title' => t('Yellow'),
      'colors' => array(
        'base'            => '#ffffff',
        'background'      => '#f9faef',
				'sitename'        => '#000000',
        'text'            => '#383838',
        'link'            => '#8d8017',
        'linkhover'       => '#de4c01',
        'linkunderline'   => '#f4eebc',
        'slogan'          => '#afa02f',
        'navigation'      => '#a0a465',
        'navigationhover' => '#6c6f42',
        'tab'             => '#f7f8ec',
        'blocktitle'      => '#afa02f',
        'border'          => '#e2e5c3',
        'borderstrong'    => '#dcd093',
        'fieldset'        => '#fbfbf8',
        'fieldsetborder'  => '#ddd7b6',
      ),
    ),
  ),
  'css' => array(
    'color/colors.css',
  ),
  'copy' => array(
    'logo.png',
  ),
  'gradients' => array(
    array(
      'dimension' => array(0, 0, 0, 0),
      'direction' => 'vertical',
      'colors' => array('link', 'text'),
    ),
  ),
  'fill' => array(),
  'slices' => array(),
  'blend_target' => '#ffffff',
  'preview_image' => 'color/preview.png',
  'preview_css' => 'color/preview.css',
  'base_image' => 'color/base.png',
);

colors.css


/* Background */
body {
  background-color: #f8f8f8;
	}
body.corolla .color-form {
  max-width: 100%;
}

/* Text */
body,
#menu-bar li.active a,
.region-header .block-content > ul > li > a,
h1.page-title,
.article h2.article-title,
.article h1.article-title a,
.article h2.article-title a,
.comment h3.comment-title a,
.tabs ul.tabs li a,
pre,
code,
samp,
var,
table.update tr,
table.system-status-report tr {
  color: #2e2e2e;
}

/*  Site Name */

#site-name {
  color: #000000;
}

#site-name a {
  color: #000000;
}

#site-name a::-moz-selection {
  background-color: #2e2e2e;
}
#site-name a::selection {
  background-color: #2e2e2e;
}
.article-title a::-moz-selection {
  background-color: #2e2e2e;
}
.article-title a::selection {
  background-color: #2e2e2e;
}

/* Links */
a,
a.active,
li a.active {
  color: #086782;
}
legend {
  background-color: #086782;
  color: #fff;
}

/* Link hovered */
a:hover,
a:focus,
a.active:hover,
a.active:focus,
li a.active:hover,
li a.active:focus {
  color: #e25401;
  border-bottom-color: #e25401;
}
.article h1.article-title a:hover,
.article h2.article-title a:hover {
  color: #e25401;
}

/* Menus */
#menu-bar-wrapper,
#menu-bar .sf-horizontal.sf-style-none li ul {
  background-color: #2e2e2d;
}
#menu-bar ul > li.active-trail > a,
#menu-bar ul > li.active-trail > a:hover,
#menu-bar ul > li.active-trail > a:focus,
#menu-bar > ul > li > a.active,
#menu-bar > ul > li > a.active:hover,
#menu-bar > ul > li > a.active:focus {
  color: #2e2e2d;
  background-color: #f8f8f8;
}
#menu-bar ul li a:hover,
#menu-bar ul li a:active,
#menu-bar ul li a:focus,
.region-header li  a:hover,
.region-header li  a:active, 
.region-header li  a:focus {
  background-color: #e25402;
}
.region-header .block-content > ul > li > a:hover,
.region-header .block-content > ul > li > a:hover,
.region-header .block-content > ul > li > a:active, 
.region-header .block-content > ul > li > a:focus,
.region-header li ul li a,
.region-header li ul li a:visited,
.region-header li ul li a:hover,
.region-header li ul li a:active, 
.region-header li ul li a:focus{
  color: #fff;
  border-color: #e25402;
}
.region-header .sf-horizontal.sf-style-none li ul {
  background-color: #c4c4c4;
}

/* Tabs */
ul.primary li a,
ul.primary li a:hover,
ul.primary li a:focus {
  border-color: #e1e1e1;
}
ul.primary li.active a {
  border-color: #e1e1e1 #e1e1e1 #fff;
}
ul.primary li.active a:hover,
ul.primary li.active a:focus {
  background: #fff;
}

/* Form inputs */
input.form-select,
input.form-text,
input.form-submit {
  border: 1px solid #c4c4c4;
}
.form-text:focus,
.form-checkbox:focus,
.form-radio:focus,
.form-select:focus {
  background: #fff;
}
textarea:focus {
  background: #fff;
}

/* Slogan */
#site-slogan {
  color: #e25400;
}
#site-slogan::selection {
  background-color:  #e25400;
}
#site-slogan::-moz-selection {
  background-color:  #e25400;
}

/* Poll */
.poll .bar .foreground {
  background-color: #e25400 !important;
}
.block-poll .poll .percent {
  color: #fff;
}

/* Border (gray) */
.region-header .sf-horizontal.sf-style-none li  a,
.region-header ul.menu li a {
  border-bottom: 3px double #e1e1e1;
}
.content-style {
  border: 1px solid #e1e1e1;
}

/* Border strong (dark gray) */
#sidebar-first input,
#sidebar-second input {
  border: 1px solid #c4c4c4;
}
.tabs ul.tabs li a {
  border: 1px solid #c4c4c4;
}
.region-header .sf-horizontal.sf-style-none li  a {
  border-bottom: 3px double #c4c4c4;
}

/* Verticle tabs */
ul.vertical-tabs-list li a {
  background-color: #f5f4f3;
}

/* Block title */
.block h2,
h2 {
  color: #779125;
}
.block h2::selection {
  color: #fff;
  background-color: #779125;
}
.block h2::-moz-selection {
  background-color: #779125;
  color: #fff;
}

/* Fieldset */
fieldset {
  background-color: #fbfbfb;
}
/* Fieldset border */
fieldset {
  border: 1px solid #e1e1e2;
}

fields.css

/* Fields */
.field .field-label {
  font-size: 1em;
  font-weight: 700;
  line-height: inherit;
  margin: 0;
}
.field-label-inline .field-label {
  display: inline;
}
.field-type-taxonomy-term-reference .field-label {
  font-size: 1em;
}
.field-type-taxonomy-term-reference ul {
  margin: 0;
  padding: 0;
}
.field-type-taxonomy-term-reference ul li {
  display: inline;
  list-style: none;
  padding: 0 .75em 0 0;
}
.field-label-inline .field-label,
.field-label-inline .field-items {
  display: inline;
}
.field-type-image figure {}
.field-type-image figure,
.field-type-image figcaption {
  margin: 0;
  padding: 0;
}
.field-type-image figure img {
  margin: auto;
  padding: 2px;
  text-align: center;
}
.field-type-image figcaption {
  font-size: 0.823em;
  font-style: italic;
  margin: auto;
  max-width: 75%;
  text-align: center;
}
table .field-type-image img 
  width: 100%;
  height: auto;
}
Jeff Burnz’s picture

Try disabling the theme, and re-enabling it.

Are you sure its not there? Not just hiding in the list where you don't expect it to be? I say this because when you add something new to the info fields array it gets added to the end, the keys are not rewritten like you might think and the new items appear at the bottom of the rendered form.

fields.css has nothing to do with this, that's for entity fields, not form elements.

Jeff Burnz’s picture

Status: Postponed (maintainer needs more info) » Active

Ops, better change that now.

bekasu’s picture

The field.css looked to have a couple of typos.

This is what I see on the color scheme settings. Of course there is the color and the #numbers for the color to the right of each entry.

Color scheme
Color set
Base
Background
Text
Link
Hovered Link
Link underline
Slogan
Navigation
Navigation hover
Tab
Block title
Border
Border strong
Fieldset
Fieldset border

Since I didn't see Site Name, I figured it was a cache issue and went to my admin/configuration/performance and cleared all cache.

I'm not sure if this is a coding issue or a cache issue, but I don't see the entry for Site Name. I
had expected it to work much like Block Title as far as naming (hyphens, no hyphens, underscores, etc). It sure fills like I'm missing something obvious.

I do appreciate you taking time to review the code. I'll keep trying things.

bekasu’s picture

Jeff -
I finally stumbled upon the solution.

Here was the lead: http://mearra.com/blogs/sampo-turve/becoming-friends-drupal-color-module... ... the relevant link is at the bottom

Here is the info they were referring to: http://drupal.org/node/1236098

Basically, if you are using a 'custom' setting, the new color info is not written to the file. You have to reset the color to be any one of the presets and save the configuration. At that point, the new entry shows up (at the bottom as you told me).

You can then swap back over to the custom setting and change the new entry.

You've had a couple of requests for allowing the sitename to be independently set and these changes would do that. Although, you might have to add a FAQ re: using a custom setting.

Let me know if you would like me to help in some way.

Jeff Burnz’s picture

Sure, its no problem to add a few more color settings to this theme, surely site name is a good one to have control over. Mostly I just get short on time, so if a patch can be written for 7.x-3.x then it would be great.

bekasu’s picture

Will do.