RobLoach / RobLoach/nuklear_console

color: add HSV slider mode alongside RGB/RGBA

Open
#269 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement widget
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 optionally NK_CONSOLE_COLOR_HSVA) to the format enum.
  • Store H/S/V as floats; convert to/from struct nk_color on 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.