ColorWheel control
Selection of a colour using a colour wheel, an intuitive graphical visualisation of the HSL colour space, as known from Paint Shop Pro.
Colour selection made easy. With the colour wheel (ColorWheel) you can set the HSL components independently of each other. The big wheel shows all hues of the rainbow (and even some more). Clicking on it moves the selection marker to a different position. The two remaining dimensions saturation and lightness for the selected hue can be selected in the centre square.
Compatibility:
Example
The following image shows the colour selection with a ColorWheel control. Here the colour dark green (#008000) is selected. You can set and get the selected colour from code with the Hue
, Saturation
and Lightness
properties. Conversion between the RGB and HSL colour space is provided by the ColorMath class.
The ColorWheel control is also used in the ColorSelector and thus also in the ColorButton control and in the Farbeimer application.
Download
ColorWheel.cs11.4 KiBSource code of the ColorWheel control
Usage notes
You need the ColorMath class to use the ColorWheel control.
Licence and terms of use
Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty. (GNU All-Permissive licence)
Statistic data
- Created on 2010-03-25, updated on 2011-03-24.
- First used in DvbViewerSkinner.
- Ca. 190 lines of code, estimated development costs: 190 - 760 €