Module color_picker

Source
Expand description

Color picker widgets.

EnumsΒ§

Alpha
What options to show for alpha

ConstantsΒ§

N πŸ”’
Number of vertices per dimension in the color sliders. We need at least 6 for hues, and more for smooth 2D areas. Should always be a multiple of 6 to hit the peak hues in HSV/HSL (every 60Β°).

FunctionsΒ§

background_checkers πŸ”’
color_button πŸ”’
color_cache_get πŸ”’
color_cache_set πŸ”’
color_edit_button_hsva
color_edit_button_rgb
Shows a button with the given color. If the user clicks the button, a full color picker is shown.
color_edit_button_rgba
Shows a button with the given color. If the user clicks the button, a full color picker is shown.
color_edit_button_srgb
Shows a button with the given color. If the user clicks the button, a full color picker is shown. The given color is in sRGB space.
color_edit_button_srgba
Shows a button with the given color. If the user clicks the button, a full color picker is shown.
color_picker_color32
Shows a color picker where the user can change the given Color32 color.
color_picker_hsva_2d
Shows a color picker where the user can change the given Hsva color.
color_picker_hsvag_2d πŸ”’
color_slider_1d πŸ”’
color_slider_2d πŸ”’
Arguments
contrast_color πŸ”’
input_type_button_ui πŸ”’
is_additive_alpha πŸ”’
We use a negative alpha for additive colors within this file (a bit ironic).
rgba_edit_ui πŸ”’
Shows 4 DragValue widgets to be used to edit the RGBA f32 values. Alpha’s DragValue is hidden when Alpha::Opaque.
show_color
Show a color with background checkers to demonstrate transparency (if any).
show_color32 πŸ”’
show_color_at
Show a color with background checkers to demonstrate transparency (if any).
srgba_edit_ui πŸ”’
Shows 4 DragValue widgets to be used to edit the RGBA u8 values. Alpha’s DragValue is hidden when Alpha::Opaque.
use_color_cache πŸ”’