Index: src/wp-admin/includes/misc.php
===================================================================
--- src/wp-admin/includes/misc.php	(revision 26549)
+++ src/wp-admin/includes/misc.php	(working copy)
@@ -613,16 +613,16 @@
 	<?php
 }
 
-function set_color_scheme_json() {
+function wp_color_scheme_settings() {
 	global $_wp_admin_css_colors;
 
 	$color_scheme = get_user_option( 'admin_color' );
 
-	if ( isset( $_wp_admin_css_colors[ $color_scheme ]->icon_colors ) ) {
-		echo '<script type="text/javascript">var wp_color_scheme = ' . json_encode( array( 'icons' => $_wp_admin_css_colors[ $color_scheme ]->icon_colors ) ) . ";</script>\n";
+	if ( ! empty( $_wp_admin_css_colors[ $color_scheme ]->icon_colors ) ) {
+		echo '<script type="text/javascript">var _wpColorScheme = ' . json_encode( array( 'icons' => $_wp_admin_css_colors[ $color_scheme ]->icon_colors ) ) . ";</script>\n";
 	}
 }
-add_action( 'admin_head', 'set_color_scheme_json' );
+add_action( 'admin_head', 'wp_color_scheme_settings' );
 
 function _ipad_meta() {
 	if ( wp_is_mobile() ) {
Index: src/wp-includes/js/svg-painter.js
===================================================================
--- src/wp-includes/js/svg-painter.js	(revision 26548)
+++ src/wp-includes/js/svg-painter.js	(working copy)
@@ -1,101 +1,93 @@
 /* global wp_color_scheme:true */
 var svgPainter = ( function( $, window, document, undefined ) {
-
 	'use strict';
+	var colorscheme, selector,
+		elements = [];
 
 	$(document).ready( function() {
-
 		// detection for browser SVG capability
 		if ( document.implementation.hasFeature( 'http://www.w3.org/TR/SVG11/feature#Image', '1.1' ) ) {
-			document.body.className = document.body.className.replace( 'no-svg', 'svg' );
+			$( document.body ).removeClass( 'no-svg' ).addClass( 'svg' );
+			svgPainter.init();
 		}
-
-		svgPainter.init();
-
 	});
 
 	return {
+		init: function() {
+			selector = $( '#adminmenu .wp-menu-image, #wpadminbar .ab-item' );
 
-		elements : [],
-
-		init : function() {
-
-			this.selector = $( '#adminmenu .wp-menu-image, #wpadminbar .ab-item' );
-
 			this.setColors();
 			this.findElements();
 			this.paint();
-
 		},
 
-		setColors : function( colors ) {
+		setColors: function( colors ) {
+			if ( typeof colors === 'undefined' && typeof window._wpColorScheme !== 'undefined' ) {
+				colors = window._wpColorScheme;
+			}
 
-			if ( typeof colors === 'undefined' && typeof wp_color_scheme !== 'undefined' ) {
-				colors = wp_color_scheme;
+			if ( colors && colors.icons && colors.icons.base && colors.icons.current && colors.icons.focus ) {
+				colorscheme = colors.icons;
 			}
-
-			this.colorscheme = colors;
-
 		},
 
-		findElements : function() {
+		findElements: function() {
+			selector.each( function() {
+				var $this = $(this), bgImage = $this.css( 'background-image' );
 
-			this.selector.each(function() {
-
-				var bgimg = $(this).css( 'background-image' );
-
-				if ( bgimg.indexOf( 'data:image/svg+xml;base64' ) != -1 ) {
-					svgPainter.elements.push( $(this) );
+				if ( bgImage && bgImage.indexOf( 'data:image/svg+xml;base64' ) != -1 ) {
+					elements.push( $this );
 				}
-
 			});
-
 		},
 
-		paint : function() {
+		paint: function() {
+			if ( ! colorscheme ) {
+				return;
+			}
 
 			// loop through all elements
-			$.each( this.elements, function( index, $element ) {
-
+			$.each( elements, function( index, $element ) {
 				var $menuitem = $element.parent().parent();
 
 				if ( $menuitem.hasClass( 'current' ) || $menuitem.hasClass( 'wp-has-current-submenu' ) ) {
-
 					// paint icon in 'current' color
-					svgPainter.paintElement( $element, svgPainter.colorscheme.icons.current );
-
+					svgPainter.paintElement( $element, 'current' );
 				} else {
-
 					// paint icon in base color
-					svgPainter.paintElement( $element, svgPainter.colorscheme.icons.base );
+					svgPainter.paintElement( $element, 'base' );
 
 					// set hover callbacks
 					$menuitem.hover(
-						function() { svgPainter.paintElement( $element, svgPainter.colorscheme.icons.focus ); },
-						function() { svgPainter.paintElement( $element, svgPainter.colorscheme.icons.base ); }
+						function() { svgPainter.paintElement( $element, 'focus' ); },
+						function() { svgPainter.paintElement( $element, 'base' ); }
 					);
-
 				}
-
 			});
-
 		},
 
-		paintElement : function( $element, color ) {
+		paintElement: function( $element, colorType ) {
+			var xml, base64, color;
 
+			if ( ! colorType || ! colorscheme.hasOwnProperty( colorType ) ) {
+				return;
+			}
+
+			color = colorscheme[ colorType ];
+
 			// only accept hex colors: #101 or #101010
-			if ( ! color.match( /^(#[0-9a-f]{3}|#[0-9a-f]{6})$/i ) )
+			if ( ! color.match( /^(#[0-9a-f]{3}|#[0-9a-f]{6})$/i ) ) {
 				return;
+			}
 
-			var xml = $element.data( 'mp6-svg-' + color ),
-				base64;
+			xml = $element.data( 'mp6-svg-' + color );
 
 			if ( ! xml ) {
-
 				base64 = $element.css( 'background-image' ).match( /.+data:image\/svg\+xml;base64,(.+)\)/ );
 
-				if ( ! base64 )
+				if ( ! base64 ) {
 					return;
+				}
 
 				try {
 					xml = window.atob( base64[1] );
@@ -119,11 +111,9 @@
 				}
 
 				$element.data( 'mp6-svg-' + color, xml );
-
 			}
 
 			$element.attr( 'style', 'background-image: url("data:image/svg+xml;base64,' + xml + '") !important;' );
-
 		}
 
 	};
Index: src/wp-includes/script-loader.php
===================================================================
--- src/wp-includes/script-loader.php	(revision 26548)
+++ src/wp-includes/script-loader.php	(working copy)
@@ -392,8 +392,6 @@
 	$scripts->add( 'media-editor', "/wp-includes/js/media-editor$suffix.js", array( 'shortcode', 'media-views' ), false, 1 );
 	$scripts->add( 'mce-view', "/wp-includes/js/mce-view$suffix.js", array( 'shortcode', 'media-models' ), false, 1 );
 
-	$scripts->add( 'svg-painter', '/wp-includes/js/svg-painter.js' );
-
 	if ( is_admin() ) {
 		$scripts->add( 'admin-tags', "/wp-admin/js/tags$suffix.js", array('jquery', 'wp-ajax-response'), false, 1 );
 		did_action( 'init' ) && $scripts->localize( 'admin-tags', 'tagsl10n', array(
@@ -516,6 +514,8 @@
 		$scripts->add( 'custom-header', "/wp-admin/js/custom-header.js", array( 'jquery-masonry' ), false, 1 );
 		$scripts->add( 'custom-background', "/wp-admin/js/custom-background$suffix.js", array( 'wp-color-picker', 'media-views' ), false, 1 );
 		$scripts->add( 'media-gallery', "/wp-admin/js/media-gallery$suffix.js", array('jquery'), false, 1 );
+
+		$scripts->add( 'svg-painter', '/wp-includes/js/svg-painter.js', array( 'jquery' ), false, 1 );
 	}
 }
 
