diff --git a/src/icons/material.js b/src/icons/material.js index 6db2a545d..b9a38b461 100644 --- a/src/icons/material.js +++ b/src/icons/material.js @@ -109,6 +109,13 @@ if (!isSourceMode && currentNode) { color = currentNode.ownerDocument .queryCommandValue('forecolor'); + + // Needed for IE + if (parseInt(color) === color) { + // eslint-disable-next-line + color = ((color & 0x0000ff) << 16) | (color & 0x00ff00) | ((color & 0xff0000) >>> 16); + color = '#' + ('000000' + color.toString(16)).slice(-6); + } } dom.css(colorPath, 'fill', color); diff --git a/src/icons/monocons.js b/src/icons/monocons.js index 36a02d570..0e852cab8 100644 --- a/src/icons/monocons.js +++ b/src/icons/monocons.js @@ -89,6 +89,13 @@ if (!isSourceMode && currentNode) { color = currentNode.ownerDocument .queryCommandValue('forecolor'); + + // Needed for IE + if (parseInt(color) === color) { + // eslint-disable-next-line + color = ((color & 0x0000ff) << 16) | (color & 0x00ff00) | ((color & 0xff0000) >>> 16); + color = '#' + ('000000' + color.toString(16)).slice(-6); + } } dom.css(colorPath, 'fill', color); diff --git a/src/lib/defaultOptions.js b/src/lib/defaultOptions.js index dda8ae1e7..d8b052b52 100644 --- a/src/lib/defaultOptions.js +++ b/src/lib/defaultOptions.js @@ -49,14 +49,14 @@ export default { * * @type {string} */ - colors: '#000,#44B8FF,#1E92F7,#0074D9,#005DC2,#00369B,#b3d5f4|' + - '#444,#C3FFFF,#9DF9FF,#7FDBFF,#68C4E8,#419DC1,#d9f4ff|' + - '#666,#72FF84,#4CEA5E,#2ECC40,#17B529,#008E02,#c0f0c6|' + - '#888,#FFFF44,#FFFA1E,#FFDC00,#E8C500,#C19E00,#fff5b3|' + - '#aaa,#FFC95F,#FFA339,#FF851B,#E86E04,#C14700,#ffdbbb|' + - '#ccc,#FF857A,#FF5F54,#FF4136,#E82A1F,#C10300,#ffc6c3|' + - '#eee,#FF56FF,#FF30DC,#F012BE,#D900A7,#B20080,#fbb8ec|' + - '#fff,#F551FF,#CF2BE7,#B10DC9,#9A00B2,#9A00B2,#e8b6ef', + colors: '#000000,#44B8FF,#1E92F7,#0074D9,#005DC2,#00369B,#b3d5f4|' + + '#444444,#C3FFFF,#9DF9FF,#7FDBFF,#68C4E8,#419DC1,#d9f4ff|' + + '#666666,#72FF84,#4CEA5E,#2ECC40,#17B529,#008E02,#c0f0c6|' + + '#888888,#FFFF44,#FFFA1E,#FFDC00,#E8C500,#C19E00,#fff5b3|' + + '#aaaaaa,#FFC95F,#FFA339,#FF851B,#E86E04,#C14700,#ffdbbb|' + + '#cccccc,#FF857A,#FF5F54,#FF4136,#E82A1F,#C10300,#ffc6c3|' + + '#eeeeee,#FF56FF,#FF30DC,#F012BE,#D900A7,#B20080,#fbb8ec|' + + '#ffffff,#F551FF,#CF2BE7,#B10DC9,#9A00B2,#9A00B2,#e8b6ef', /** * The locale to use.