### Godot version

v4.1.stable.official [970459615]

### System information

Godot v4.1.stable - Pop!_OS 22.04 LTS - Vulkan (Compatibility) - NVIDIA GeForce MX350 (nvidia; 525.116.04) - 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz (8 Threads)

### Issue description

When I use the color picker to change a color, I can paste an HTML color code or write it myself. I can also prefix my text with a `#`  &mdash; the color picker will accept it as a valid color and update the corresponding element with that color. This is especially useful when I copy an HTML color code from a color palette like the one on lospec.com, since they always have a hash in front of them.

However, I cannot paste HTML color codes with surrounding spaces into this text box, even though the color code (without the spaces) is valid.

I would definitely call this behaviour a bug, since other programs like Affinity Designer, Blender or Gimp are very permissive about the input of HTML color codes. Or according to Jon Postel, *Be conservative in what you send, be liberal in what you accept.*

### Steps to reproduce

Preparation: 

1. create a new Godot project
2. create a new 2d scene
3. add a ColorRect node.
4. open the color picker for the color attribute in the inspector tab.

Explore the bug:

1. enter a valid HTML color code like `000` (black) => color is updated.
2. enter a valid HTML color code like `#fff` (white) => color is updated.
3. enter a valid HTML color code with leading space, for example `   #000` => color is not updated.
4. enter a valid HTML color code like `#000`(black) => color is updated.
5. enter a valid HTML color code with surrounding spaces, e.g. `   fff   ` => color is not updated.
6. enter a valid HTML color code like `fff`=> color is updated.

### Minimal reproduction project

N/A
sb_flat->set_bg_color(Color(1, 1, 1));
					sb_flat->draw(get_canvas_item(), r);
					Rect2 bg_texture_rect = r.grow_side(SIDE_LEFT, -sb_flat->get_margin(SIDE_LEFT));
					bg_texture_rect = bg_texture_rect.grow_side(SIDE_RIGHT, -sb_flat->get_margin(SIDE_RIGHT));
					bg_texture_rect = bg_texture_rect.grow_side(SIDE_TOP, -sb_flat->get_margin(SIDE_TOP));
					bg_texture_rect = bg_texture_rect.grow_side(SIDE_BOTTOM, -sb_flat->get_margin(SIDE_BOTTOM));
					draw_texture_rect(theme_cache.background_icon, bg_texture_rect, true);
					sb_flat->set_bg_color(preset_color);
				}
				sb_flat->set_bg_color(preset_color);
				sb_flat->draw(get_canvas_item(), r);
			} else if (sb_texture.is_valid()) {
				if (preset_color.a < 1) {
					
					bool use_tile_texture = (sb_texture->get_h_axis_stretch_mode() == StyleBoxTexture::AxisStretchMode::AXIS_STRETCH_MODE_TILE) || (sb_texture->get_h_axis_stretch_mode() == StyleBoxTexture::AxisStretchMode::AXIS_STRETCH_MODE_TILE_FIT);
					draw_texture_rect(theme_cache.background_icon, r, use_tile_texture);
				}
				sb_texture->set_modulate(preset_color);
				sb_texture->draw(get_canvas_item(), r);
			} else {
				WARN_PRINT("Unsupported StyleBox used for ColorPresetButton. Use StyleBoxFlat or StyleBoxTexture instead.");
			}
			if (preset_color.r > 1 || preset_color.g > 1 || preset_color.b > 1) {
				
				draw_texture(theme_cache.overbright_indicator, Vector2(0, 0));
			}
		} break;
	}
}
void ColorPresetButton::_update_theme_item_cache() {