### 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
}
void ColorPicker::_update_theme_item_cache() {
	VBoxContainer::_update_theme_item_cache();
	theme_cache.base_scale = get_theme_default_base_scale();
	theme_cache.content_margin = get_theme_constant(SNAME("margin"));
	theme_cache.label_width = get_theme_constant(SNAME("label_width"));
	theme_cache.sv_width = get_theme_constant(SNAME("sv_width"));
	theme_cache.sv_height = get_theme_constant(SNAME("sv_height"));
	theme_cache.h_width = get_theme_constant(SNAME("h_width"));
	theme_cache.center_slider_grabbers = get_theme_constant(SNAME("center_slider_grabbers"));
	theme_cache.screen_picker = get_theme_icon(SNAME("screen_picker"));
	theme_cache.expanded_arrow = get_theme_icon(SNAME("expanded_arrow"));
	theme_cache.folded_arrow = get_theme_icon(SNAME("folded_arrow"));
	theme_cache.add_preset = get_theme_icon(SNAME("add_preset"));
	theme_cache.shape_rect = get_theme_icon(SNAME("shape_rect"));
	theme_cache.shape_rect_wheel = get_theme_icon(SNAME("shape_rect_wheel"));
	theme_cache.shape_circle = get_theme_icon(SNAME("shape_circle"));
	theme_cache.bar_arrow = get_theme_icon(SNAME("bar_arrow"));
	theme_cache.sample_background_icon = get_theme_icon(SNAME("sample_bg"), SNAME("ColorPicker"));
	theme_cache.overbright_indicator = get_theme_icon(SNAME("overbright_indicator"), SNAME("ColorPicker"));
	theme_cache.picker_cursor = get_theme_icon(SNAME("picker_cursor"));
	theme_cache.color_hue_icon = get_theme_icon(SNAME("color_hue"));
	theme_cache.mode_button_normal = get_theme_stylebox("tab_unselected", "TabContainer");
	theme_cache.mode_button_pressed = get_theme_stylebox("tab_selected", "TabContainer");
	theme_cache.mode_button_hover = get_theme_stylebox("tab_selected", "TabContainer");
}
Ref<Shader> ColorPicker::wheel_shader;
Ref<Shader> ColorPicker::circle_shader;
Ref<Shader> ColorPicker::circle_ok_color_shader;
void ColorPicker::init_shaders() {