ApoorvaJ / Papaya

A GPU-powered image editor (in the making)
MIT License
373 stars 33 forks source link

Color picker hex input and validation #9

Closed ApoorvaJ closed 8 years ago

ApoorvaJ commented 8 years ago

Hex input The color picker currently doesn't have an textbox for expressing the color as a hexadecimal value. This box would be located below the RGB boxes.

Input validation The RGB textboxes currently do not have any validation. So the user can enter invalid numerical values. A validation step should be performed any give input box loses focus, or enter is pressed in it. For RGB, values should be clamped to the range [0, 255]. Similar behaviour should be implemented for the hex box.

The current color picker looks like this:

image

The color picker code is located in src/core/picker.cpp, and the code which calls the picker is located in src/papaya_core.cpp