Slight refactor of colour handling; add additional properties (#218)

* Add and render opacity of blocks

* Add insertion marker colour and opacity

* Add goog.require for Colours in block.js

* Add color of text field during editing

* Add colour overriding upon injection

* Add colours to CSS at run-time injection

* Expand colour variables to include toolbox, flyout, scrollbars

* Example of dark mode in horizontal_playground

* Fix loop style for colours
This commit is contained in:
Tim Mickel 2016-04-14 18:04:17 -04:00
parent 0fb21a90fe
commit 62509d41ad
8 changed files with 91 additions and 9 deletions

View file

@ -3,6 +3,8 @@
goog.provide('Blockly.Colours');
Blockly.Colours = {
// SVG colours: these must be specificed in #RRGGBB style
// To add an opacity, this must be specified as a separate property (for SVG fill-opacity)
"motion": {
"primary": "#4C97FF",
"secondary": "#4280D7",
@ -30,5 +32,12 @@ Blockly.Colours = {
},
"text": "#575E75",
"workspace": "#F5F8FF",
"textField": "#FFFFFF"
"toolbox": "#DDDDDD",
"toolboxText": "#000000",
"flyout": "#DDDDDD",
"scrollbar": "#CCCCCC",
"scrollbarHover": '#BBBBBB',
"textField": "#FFFFFF",
"insertionMarker": "#949494",
"insertionMarkerOpacity": 0.6
};