diff --git a/components/BackgroundSelect.js b/components/BackgroundSelect.js
index 50ca6d2..f92c5cf 100644
--- a/components/BackgroundSelect.js
+++ b/components/BackgroundSelect.js
@@ -23,7 +23,16 @@ class BackgroundSelect extends React.PureComponent {
handlePickColor = ({ rgb }) => this.props.onChange({ backgroundColor: stringifyRGBA(rgb) })
render() {
- const { color, mode, image, onChange, isVisible, toggleVisibility, carbonRef } = this.props
+ const {
+ color,
+ mode,
+ image,
+ onChange,
+ isVisible,
+ toggleVisibility,
+ carbonRef,
+ updateHighlights
+ } = this.props
const background = validateColor(color) ? color : DEFAULT_BG_COLOR
@@ -70,7 +79,12 @@ class BackgroundSelect extends React.PureComponent {
-
+
diff --git a/components/Editor.js b/components/Editor.js
index 02f101f..06ac125 100644
--- a/components/Editor.js
+++ b/components/Editor.js
@@ -377,6 +377,7 @@ class Editor extends React.Component {
/>
c.hex)
+ /*
+ * Contributors, please feel free to adjust this algorithm to create the most
+ * readible or aesthetically pleasing syntax highlighting.
+ */
+ this.props.updateHighlights({
+ background: palette[0],
+ text: palette[1],
+ variable: palette[2],
+ attribute: palette[3],
+ definition: palette[4],
+ keyword: palette[5],
+ property: palette[6],
+ string: palette[7],
+ number: palette[8],
+ operator: palette[9],
+ meta: palette[10],
+ tag: palette[11],
+ comment: palette[12]
+ })
+ }
}
removeImage() {
@@ -192,6 +221,7 @@ export default class ImagePicker extends React.Component {
Or use a random Unsplash image:
+ (this.generateColorPalette = value)} />