Skip to content

Commit

Permalink
Merge branch 'develop' into develop-builds
Browse files Browse the repository at this point in the history
  • Loading branch information
GarboMuffin committed Jan 9, 2024
2 parents 87c4045 + 80adc23 commit 8560867
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/toolbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -785,12 +785,12 @@ Blockly.Toolbox.Category.prototype.setColour = function(node) {
var colour = node.getAttribute('colour');
var secondaryColour = node.getAttribute('secondaryColour');
if (goog.isString(colour)) {
if (colour.match(/^#[0-9a-fA-F]{6}$/)) {
if (colour.match(/^#[0-9a-fA-F]{6,8}$/)) {
this.colour_ = colour;
} else {
this.colour_ = Blockly.hueToRgb(colour);
}
if (secondaryColour.match(/^#[0-9a-fA-F]{6}$/)) {
if (secondaryColour.match(/^#[0-9a-fA-F]{6,8}$/)) {
this.secondaryColour_ = secondaryColour;
} else {
this.secondaryColour_ = Blockly.hueToRgb(secondaryColour);
Expand Down

0 comments on commit 8560867

Please sign in to comment.