mirror of
https://github.com/google/blockly.git
synced 2026-01-10 10:27:08 +01:00
115 lines
2.7 KiB
JavaScript
115 lines
2.7 KiB
JavaScript
/**
|
|
* @license
|
|
* Copyright 2019 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
/**
|
|
* @fileoverview Tritanopia theme.
|
|
* A color palette for people that have tritanopia(the inability to perceive
|
|
* blue light).
|
|
*/
|
|
'use strict';
|
|
|
|
goog.provide('Blockly.Themes.Tritanopia');
|
|
|
|
goog.require('Blockly.Theme');
|
|
|
|
|
|
// Temporary holding object.
|
|
Blockly.Themes.Tritanopia = {};
|
|
|
|
Blockly.Themes.Tritanopia.defaultBlockStyles = {
|
|
"colour_blocks": {
|
|
"colourPrimary": "#05427f",
|
|
"colourSecondary": "#2974c0",
|
|
"colourTertiary": "#2d74bb"
|
|
},
|
|
"list_blocks": {
|
|
"colourPrimary": "#b69ce8",
|
|
"colourSecondary": "#ccbaef",
|
|
"colourTertiary": "#9176c5"
|
|
},
|
|
"logic_blocks": {
|
|
"colourPrimary": "#9fd2f1",
|
|
"colourSecondary": "#c0e0f4",
|
|
"colourTertiary": "#74bae5"
|
|
},
|
|
"loop_blocks": {
|
|
"colourPrimary": "#aa1846",
|
|
"colourSecondary": "#d36185",
|
|
"colourTertiary": "#7c1636"
|
|
},
|
|
"math_blocks": {
|
|
"colourPrimary": "#e6da39",
|
|
"colourSecondary": "#f3ec8e",
|
|
"colourTertiary": "#f2eeb7"
|
|
},
|
|
"procedure_blocks": {
|
|
"colourPrimary": "#590721",
|
|
"colourSecondary": "#8c475d",
|
|
"colourTertiary": "#885464"
|
|
},
|
|
"text_blocks": {
|
|
"colourPrimary": "#058863",
|
|
"colourSecondary": "#5ecfaf",
|
|
"colourTertiary": "#04684c"
|
|
},
|
|
"variable_blocks": {
|
|
"colourPrimary": "#4b2d84",
|
|
"colourSecondary": "#816ea7",
|
|
"colourTertiary": "#83759e"
|
|
},
|
|
"variable_dynamic_blocks": {
|
|
"colourPrimary": "#4b2d84",
|
|
"colourSecondary": "#816ea7",
|
|
"colourTertiary": "#83759e"
|
|
}
|
|
};
|
|
|
|
Blockly.Themes.Tritanopia.categoryStyles = {
|
|
"colour_category": {
|
|
"colour": "#05427f"
|
|
},
|
|
"list_category": {
|
|
"colour": "#b69ce8"
|
|
},
|
|
"logic_category": {
|
|
"colour": "#9fd2f1"
|
|
},
|
|
"loop_category": {
|
|
"colour": "#aa1846"
|
|
},
|
|
"math_category": {
|
|
"colour": "#e6da39"
|
|
},
|
|
"procedure_category": {
|
|
"colour": "#590721"
|
|
},
|
|
"text_category": {
|
|
"colour": "#058863"
|
|
},
|
|
"variable_category": {
|
|
"colour": "#4b2d84"
|
|
},
|
|
"variable_dynamic_category": {
|
|
"colour": "#4b2d84"
|
|
}
|
|
};
|
|
|
|
Blockly.Themes.Tritanopia =
|
|
new Blockly.Theme('tritanopia',
|
|
Blockly.Themes.Tritanopia.defaultBlockStyles,
|
|
Blockly.Themes.Tritanopia.categoryStyles);
|