ColorPicker: Add intensity slider

Add intensity slider to all color modes. Replace raw mode by linear mode, which uses linear color space.

When color is overbright, automatically switch hex text to script text. Allow executing expression in script text field to set color. Add the "script" icon to the default theme.
This commit is contained in:
LuoZhihao
2025-05-23 12:45:29 +08:00
parent 32eafc18b4
commit 8a9409257b
13 changed files with 545 additions and 298 deletions

View File

@@ -1055,6 +1055,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_icon("bar_arrow", "ColorPicker", icons["color_picker_bar_arrow"]);
theme->set_icon("picker_cursor", "ColorPicker", icons["color_picker_cursor"]);
theme->set_icon("picker_cursor_bg", "ColorPicker", icons["color_picker_cursor_bg"]);
theme->set_icon("color_script", "ColorPicker", icons["script"]);
{
const int precision = 7;