code: function filterValue(value, channel) {
          var type;
          for (var key in DATATYPES) {
              type = DATATYPES[key];
              if (type.flag & channel.dataType) {
                  var val = type.parse(value);
                  if (val !== false) {
                      if (type.flag === PERCENT) {
                          val *= Math.abs(channel.range[1] - channel.range[0]);
                      }
                      return channel.filter(val);
                  }
              }
          }
          return channel.initial;
      }
docs: Filters input value according to data type definitions and color space configurations.