components/blockly-src/blocks/colour.js
function() {
    this.setHelpUrl(Blockly.Msg.COLOUR_RGB_HELPURL);
    this.setColour(Blockly.Blocks.colour.HUE);
    this.appendValueInput('RED')
        .setCheck('Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.COLOUR_RGB_TITLE)
        .appendField(Blockly.Msg.COLOUR_RGB_RED);
    this.appendValueInput('GREEN')
        .setCheck('Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.COLOUR_RGB_GREEN);
    this.appendValueInput('BLUE')
        .setCheck('Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.COLOUR_RGB_BLUE);
    this.setOutput(true, 'Colour');
    this.setTooltip(Blockly.Msg.COLOUR_RGB_TOOLTIP);
  }
function() {
    this.setHelpUrl(Blockly.Msg.COLOUR_RGB_HELPURL);
    this.setColour(Blockly.Blocks.colour.HUE);
    this.appendValueInput('RED')
        .setCheck('Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.COLOUR_RGB_TITLE)
        .appendField(Blockly.Msg.COLOUR_RGB_RED);
    this.appendValueInput('GREEN')
        .setCheck('Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.COLOUR_RGB_GREEN);
    this.appendValueInput('BLUE')
        .setCheck('Number')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.COLOUR_RGB_BLUE);
    this.setOutput(true, 'Colour');
    this.setTooltip(Blockly.Msg.COLOUR_RGB_TOOLTIP);
  }
function ( ) { this . setHelpUrl ( Blockly . Msg . COLOUR_RGB_HELPURL ) ; this . setColour ( Blockly . Blocks . colour . HUE ) ; this . appendValueInput ( 'RED' ) . setCheck ( 'Number' ) . setAlign ( Blockly . ALIGN_RIGHT ) . appendField ( Blockly . Msg . COLOUR_RGB_TITLE ) . appendField ( Blockly . Msg . COLOUR_RGB_RED ) ; this . appendValueInput ( 'GREEN' ) . setCheck ( 'Number' ) . setAlign ( Blockly . ALIGN_RIGHT ) . appendField ( Blockly . Msg . COLOUR_RGB_GREEN ) ; this . appendValueInput ( 'BLUE' ) . setCheck ( 'Number' ) . setAlign ( Blockly . ALIGN_RIGHT ) . appendField ( Blockly . Msg . COLOUR_RGB_BLUE ) ; this . setOutput ( true , 'Colour' ) ; this . setTooltip ( Blockly . Msg . COLOUR_RGB_TOOLTIP ) ; }
Block for composing a colour from RGB components.
@this Blockly.Block
Block for composing a colour from RGB components .