diff --git a/core/modules/color/color.js b/core/modules/color/color.js
index 62eab38..13a1b22 100644
--- a/core/modules/color/color.js
+++ b/core/modules/color/color.js
@@ -142,14 +142,14 @@
           // Update locked values.
           if (propagate) {
             i = input.i;
-            for (j = i + 1; ; ++j) {
+            for (j = i + 1; true; ++j) {
               if (!locks[j - 1] || $(locks[j - 1]).is('.unlocked')) {
                 break;
               }
               matched = shift_color(color, reference[input.key], reference[inputs[j].key]);
               callback(inputs[j], matched, false);
             }
-            for (j = i - 1; ; --j) {
+            for (j = i - 1; true; --j) {
               if (!locks[j] || $(locks[j]).is('.unlocked')) {
                 break;
               }
@@ -255,5 +255,4 @@
       preview();
     }
   };
-
 })(jQuery);
diff --git a/core/modules/color/color.module b/core/modules/color/color.module
index 7809f5f..84a509e 100644
--- a/core/modules/color/color.module
+++ b/core/modules/color/color.module
@@ -156,7 +156,7 @@ function color_get_palette($theme, $default = FALSE) {
 /**
  * Form constructor for the color configuration form for a particular theme.
  *
- * @param $theme
+ * @param String $theme
  *   The machine name of the theme whose color settings are being configured.
  *
  * @see color_scheme_form_validate()
@@ -247,9 +247,7 @@ function color_scheme_form($complete_form, &$form_state, $theme) {
 }
 
 /**
- * Prepares variables for color scheme form templates.
- *
- * Default template: color-scheme-form.html.twig.
+ * Prepares variables for color-scheme-form.html.twig.
  *
  * @param array $variables
  *   An associative array containing:
@@ -275,6 +273,7 @@ function template_preprocess_color_scheme_form(&$variables) {
   $variables['html_preview'] = file_get_contents($preview_html_path);
 }
 
+
 /**
  * Determines the value for a palette color field.
  *
@@ -509,7 +508,6 @@ function _color_rewrite_stylesheet($theme, &$info, &$paths, $palette, $style) {
     }
     else {
       // Determine the most suitable base color for the next color.
-
       // 'a' declarations. Use link.
       if (preg_match('@[^a-z0-9_-](a)[^a-z0-9_-][^/{]*{[^{]+$@i', $chunk)) {
         $base = 'link';
@@ -620,7 +618,7 @@ function _color_render_images($theme, &$info, &$paths, $palette) {
     imagedestroy($slice);
     $paths['files'][] = $image;
 
-    // Set standard file permissions for webserver-generated files
+    // Set standard file permissions for webserver-generated files.
     drupal_chmod($image);
 
     // Build before/after map of image paths.
@@ -646,7 +644,6 @@ function _color_render_images($theme, &$info, &$paths, $palette) {
 function _color_shift($given, $ref1, $ref2, $target) {
   // We assume that ref2 is a blend of ref1 and target and find
   // delta based on the length of the difference vectors.
-
   // delta = 1 - |ref2 - ref1| / |white - ref1|
   $target = _color_unpack($target, TRUE);
   $ref1 = _color_unpack($ref1, TRUE);
@@ -746,7 +743,7 @@ function _color_hsl2rgb($hsl) {
   $h = $hsl[0];
   $s = $hsl[1];
   $l = $hsl[2];
-  $m2 = ($l <= 0.5) ? $l * ($s + 1) : $l + $s - $l*$s;
+  $m2 = ($l <= 0.5) ? $l * ($s + 1) : $l + $s - $l * $s;
   $m1 = $l * 2 - $m2;
 
   return array(
@@ -761,9 +758,15 @@ function _color_hsl2rgb($hsl) {
  */
 function _color_hue2rgb($m1, $m2, $h) {
   $h = ($h < 0) ? $h + 1 : (($h > 1) ? $h - 1 : $h);
-  if ($h * 6 < 1) return $m1 + ($m2 - $m1) * $h * 6;
-  if ($h * 2 < 1) return $m2;
-  if ($h * 3 < 2) return $m1 + ($m2 - $m1) * (0.66666 - $h) * 6;
+  if ($h * 6 < 1) {
+    return $m1 + ($m2 - $m1) * $h * 6;
+  }
+  if ($h * 2 < 1) {
+    return $m2;
+  }
+  if ($h * 3 < 2) {
+    return $m1 + ($m2 - $m1) * (0.66666 - $h) * 6;
+  }
 
   return $m1;
 }
@@ -787,9 +790,15 @@ function _color_rgb2hsl($rgb) {
 
   $h = 0;
   if ($delta > 0) {
-    if ($max == $r && $max != $g) $h += ($g - $b) / $delta;
-    if ($max == $g && $max != $b) $h += (2 + ($b - $r) / $delta);
-    if ($max == $b && $max != $r) $h += (4 + ($r - $g) / $delta);
+    if ($max == $r && $max != $g) {
+      $h += ($g - $b) / $delta;
+    }
+    if ($max == $g && $max != $b) {
+      $h += (2 + ($b - $r) / $delta);
+    }
+    if ($max == $b && $max != $r) {
+      $h += (4 + ($r - $g) / $delta);
+    }
     $h /= 6;
   }
 
diff --git a/core/modules/color/css/color.admin.css b/core/modules/color/css/color.admin.css
index 5da8c35..629b1ce 100644
--- a/core/modules/color/css/color.admin.css
+++ b/core/modules/color/css/color.admin.css
@@ -4,33 +4,46 @@
  */
 .color-form {
   max-width: 50em;
+  position: relative;
+}
+#placeholder {
+  position: absolute;
+  right: 0; /* LTR */
+  top: 0;
 }
 .farbtastic {
   margin: 0 auto;
 }
 .color-form .form-item {
-  overflow: hidden;
+  height: 2em;
+  line-height: 2em;
   margin: 0.5em 0;
+  overflow: hidden;
+  padding-left: 1em; /* LTR */
 }
 .color-form label {
   clear: left; /* LTR */
+  float: left; /* LTR */
+  width: 10em;
 }
 [dir="rtl"] .color-form label {
   clear: right;
 }
 .color-form .form-text {
+  cursor: pointer;
   float: left; /* LTR */
-  width: 86%;
+  margin-right: 5px; /* LTR */
   text-align: center;
-  cursor: pointer;
+  width: 86%;
 }
 [dir="rtl"] .color-form .form-text {
   float: right;
 }
 #palette .hook {
   float: left; /* LTR */
-  width: 16px;
   height: 16px;
+  margin-top: 3px;
+  width: 16px;
 }
 [dir="rtl"] #palette .hook {
   float: right;
@@ -58,11 +71,14 @@
   background-position: 0 -54px;
 }
 #palette .lock {
-  float: left; /* LTR */
-  width: 20px;
-  height: 19px;
   background: url(../images/lock.png) no-repeat 50% 0;
   cursor: pointer;
+  float: left; /* LTR */
+  height: 19px;
+  left: -10px; /* LTR */
+  position: relative;
+  top: -1.4em;
+  width: 20px;
 }
 [dir="rtl"] #palette .lock {
   float: right;
@@ -127,8 +143,8 @@
 }
 .js #preview {
   display: block;
-  position: relative;
   float: left; /* LTR */
+  position: relative;
 }
 .js[dir="rtl"] #preview {
   float: right;
diff --git a/core/modules/color/lib/Drupal/color/Tests/ColorTest.php b/core/modules/color/lib/Drupal/color/Tests/ColorTest.php
index 6238019..265c055 100644
--- a/core/modules/color/lib/Drupal/color/Tests/ColorTest.php
+++ b/core/modules/color/lib/Drupal/color/Tests/ColorTest.php
@@ -26,7 +26,7 @@ class ColorTest extends WebTestBase {
    *
    * @var \Drupal\user\UserInterface
    */
-  protected $big_user;
+  protected $bigUser;
 
   /**
    * An associative array of settings for themes.
@@ -45,6 +45,9 @@ class ColorTest extends WebTestBase {
    */
   protected $colorTests;
 
+  /**
+   * {@inheritdoc}
+   */
   public static function getInfo() {
     return array(
       'name' => 'Color functionality',
@@ -56,11 +59,11 @@ public static function getInfo() {
   /**
    * {@inheritdoc}
    */
-  function setUp() {
+  public function setUp() {
     parent::setUp();
 
     // Create user.
-    $this->big_user = $this->drupalCreateUser(array('administer themes'));
+    $this->bigUser = $this->drupalCreateUser(array('administer themes'));
 
     // This tests the color module in Bartik.
     $this->themes = array(
@@ -94,9 +97,9 @@ function setUp() {
   /**
    * Tests the Color module functionality.
    */
-  function testColor() {
+  public function testColor() {
     foreach ($this->themes as $theme => $test_values) {
-      $this->_testColor($theme, $test_values);
+      $this->subTestColor($theme, $test_values);
     }
   }
 
@@ -109,13 +112,13 @@ function testColor() {
    *   An associative array of test settings (i.e. 'Main background', 'Text
    *   color', 'Color set', etc) for the theme which being tested.
    */
-  function _testColor($theme, $test_values) {
+  public function subTestColor($theme, $test_values) {
     \Drupal::config('system.theme')
       ->set('default', $theme)
       ->save();
     $settings_path = 'admin/appearance/settings/' . $theme;
 
-    $this->drupalLogin($this->big_user);
+    $this->drupalLogin($this->bigUser);
     $this->drupalGet($settings_path);
     $this->assertResponse(200);
     $edit['scheme'] = '';
@@ -126,7 +129,7 @@ function _testColor($theme, $test_values) {
     $stylesheets = \Drupal::config('color.' . $theme)->get('stylesheets');
     foreach ($stylesheets as $stylesheet) {
       $this->assertPattern('|' . file_create_url($stylesheet) . '|', 'Make sure the color stylesheet is included in the content. (' . $theme . ')');
-      $stylesheet_content = join("\n", file($stylesheet));
+      $stylesheet_content = implode("\n", file($stylesheet));
       $this->assertTrue(strpos($stylesheet_content, 'color: #123456') !== FALSE, 'Make sure the color we changed is in the color stylesheet. (' . $theme . ')');
     }
 
@@ -138,7 +141,7 @@ function _testColor($theme, $test_values) {
     $this->drupalGet('<front>');
     $stylesheets = \Drupal::config('color.' . $theme)->get('stylesheets');
     foreach ($stylesheets as $stylesheet) {
-      $stylesheet_content = join("\n", file($stylesheet));
+      $stylesheet_content = implode("\n", file($stylesheet));
       $this->assertTrue(strpos($stylesheet_content, 'color: ' . $test_values['scheme_color']) !== FALSE, 'Make sure the color we changed is in the color stylesheet. (' . $theme . ')');
     }
 
@@ -150,7 +153,7 @@ function _testColor($theme, $test_values) {
     $stylesheets = \Drupal::state()->get('drupal_css_cache_files') ?: array();
     $stylesheet_content = '';
     foreach ($stylesheets as $uri) {
-      $stylesheet_content .= join("\n", file(drupal_realpath($uri)));
+      $stylesheet_content .= implode("\n", file(drupal_realpath($uri)));
     }
     $this->assertTrue(strpos($stylesheet_content, 'public://') === FALSE, 'Make sure the color paths have been translated to local paths. (' . $theme . ')');
     $config->set('css.preprocess', 0);
@@ -160,20 +163,20 @@ function _testColor($theme, $test_values) {
   /**
    * Tests whether the provided color is valid.
    */
-  function testValidColor() {
+  public function testValidColor() {
     \Drupal::config('system.theme')
       ->set('default', 'bartik')
       ->save();
     $settings_path = 'admin/appearance/settings/bartik';
 
-    $this->drupalLogin($this->big_user);
+    $this->drupalLogin($this->bigUser);
     $edit['scheme'] = '';
 
     foreach ($this->colorTests as $color => $is_valid) {
       $edit['palette[bg]'] = $color;
       $this->drupalPostForm($settings_path, $edit, t('Save configuration'));
 
-      if($is_valid) {
+      if ($is_valid) {
         $this->assertText('The configuration options have been saved.');
       }
       else {
