private static Float getHsbComponent(Object value, boolean checkRange) {
    if (value instanceof Number) {
      float component = ((Number)value).floatValue();
      if (!checkRange || component >= 0.0f && component <= 1.0f) {
        return component;
      }
    }
    return null;
  }
private static Float getHsbComponent(Object value, boolean checkRange)