Skip to content

Left border color won't change when a rgb() value passed to addColor #208

Open
@hijiangtao

Description

@hijiangtao

Bug description

According to tutorial, we can use .addColor() with following approach:

var FizzyText = function() {
  this.color0 = "#ffae23"; // CSS string
  this.color1 = [ 0, 128, 255 ]; // RGB array
};

window.onload = function() {
  var text = new FizzyText();
  var gui = new dat.GUI();

  gui.addColor(text, 'color0');
  gui.addColor(text, 'color1');
};

However, the left border color will change according to user's color selection only when color variable assigned as CSS string, and it won't work in RGB array.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions