.. _class_createMainParam_color: createMainParam_color ===================== **图块代码** .. image:: img/createMainParam_color.png ---- **javascript** .. code-block:: javascript { type: "color", name: name, caption: caption, initial: value }, ---- **python** .. code-block:: python { "type": "color", "name": name, "caption": caption, "initial": value }, ---- **npl** .. code-block:: lua { type = "color", name = name, caption = caption, initial = value }, ---- 参数 ---- +-----------+----------+-------------+--------+ | 参数 | 类型 | 默认值 | 说明 | +===========+==========+=============+========+ | name | string | "color1" | | +-----------+----------+-------------+--------+ | caption | string | "颜色" | | +-----------+----------+-------------+--------+ | value | string | "#ffc658" | | +-----------+----------+-------------+--------+ 示例 ---- .. tabs:: .. tab:: javascript .. code-block:: javascript { type: "color", name: 'color1', caption: '颜色', initial: "#ffc658" }, .. tab:: python .. code-block:: python { "type": "color", "name": 'color1', "caption": '颜色', "initial": "#ffc658" }, .. tab:: npl .. code-block:: lua { type = "color", name = 'color1', caption = '颜色', initial = "#ffc658" },