RobLoach / RobLoach/nuklear_console
color: add HSV slider mode alongside RGB/RGBA
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 22
- Forks
- 4
- Avg merge
- 4m
- Merged PRs (30d)
- 2
Description
nk_console_color_data (nuklear_console_color.h:4) only supports NK_RGB and NK_RGBA. Nuklear has nk_color_hsv_f() / nk_hsv_f() built in, so HSV is a natural addition for use cases like hue-based palette pickers.
Suggested Implementation
- Add
NK_CONSOLE_COLOR_HSV(and optionallyNK_CONSOLE_COLOR_HSVA) to the format enum. - Store H/S/V as floats; convert to/from
struct nk_coloron read/write. - Render three sliders labelled H / S / V instead of R / G / B.
QA
nk_console_color(parent, &col, NK_CONSOLE_COLOR_HSV) renders H/S/V sliders, and the bound nk_color reflects the correct RGB equivalent.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in nk_console_color.h at nk_console_color_data and the nk_console_color entry point, then review nk_color_hsv_f() and nk_hsv_f(). Add the HSV format and H/S/V slider behavior described in the issue, with conversion to the bound struct nk_color. Done means nk_console_color(parent, &col, NK_CONSOLE_COLOR_HSV) renders H/S/V sliders and updates the RGB color correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 74/100