0

At First: I am searching about how to work with colors , to make a single trackbar for choosing color something like this but in c#:

Simple Color Bar

But i don't know how because there is no UI for this and i saw a lot of videos in YouTube learning how to create RGB Values by 3 Trackbar , that is easy like a kid. but i want it if there is no UI like the photo in above link, at least create a color picker with a single trackbar.

Thanks for your help.

AKX
  • 152,115
  • 15
  • 115
  • 172
  • 4
    The image represents the hues in a [HSV/HSL](https://en.wikipedia.org/wiki/HSL_and_HSV) color space, if it helps. With a single bar like that, you'll never be able to select a color like "dark blue" or "grayish green", or "white" for that matter. – AKX Sep 28 '21 at 11:11
  • @AKX Thats enough for me if i can create something like this – AshiMashi Sep 28 '21 at 11:14
  • Well, now you know that the bar represents hues in the HSV/HSL space. Start by writing an app that has a slider, then convert the HSV color `h, 100%, 100%` (HSL `h, 100%, 50%`) into an RGB color and show it on screen – something like this codepen, but in C# :) https://codepen.io/akx/pen/zYzyjRG – AKX Sep 28 '21 at 11:16
  • Even simpler than a trackbar is a control that displays a palette and use the mouseclick to pick a color from there. This will even give you a 2d colorspace, though still not 3d.. - [example 1](https://stackoverflow.com/questions/45290317/how-can-i-fill-part-of-image-with-color/45299760#45299760) - [example 2](https://stackoverflow.com/questions/41659729/how-to-draw-shapes-and-color-them-with-a-button/41660406#41660406) – TaW Sep 28 '21 at 12:17

0 Answers0