code: function(val) {
          this.value = {
              h: 0,
              s: 0,
              b: 0,
              a: 1
          };
          this.origFormat = null; // original string format
          if (val) {
              if (val.toLowerCase !== undefined) {
                  this.setColor(val);
              } else if (val.h !== undefined) {
                  this.value = val;
              }
          }
      }
docs: Color object