mirror of
https://github.com/google/blockly.git
synced 2026-01-10 02:17:09 +01:00
Don't crash when HSV_VALUE == 1
256 isn't a valid value (valid values range from 0-255, inclusive). So the correct constant to multiply by is 255.
This commit is contained in:
@@ -101,7 +101,7 @@ Blockly.SPRITE = {
|
||||
*/
|
||||
Blockly.makeColour = function(hue) {
|
||||
return goog.color.hsvToHex(hue, Blockly.HSV_SATURATION,
|
||||
Blockly.HSV_VALUE * 256);
|
||||
Blockly.HSV_VALUE * 255);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user