As part of a toolbox with a GUI that supports statistical map overlay, I wanted to have a nice interface to select (pick) colors. Most programs (e.g. Photoshop) have a comparable option.
colorpicker - pick a color from the RGB/HSV color space FORMAT: color = colorpicker([icolor [, icnames]]); Input fields: icolor initial color or colors (default: [0, 0, 0]); icnames color name(s) (labels) Output fields: color Cx3 RGB color (values in the [0...255] range)
The general layout is always the same and looks like this:
Each of the five areas showing a color-gradient is click-sensitive, which means that by clicking at a given position, the color will change to the color below the mouse cursor.
Additionally, colors can be coded either in the HSV or RGB color space (with a scaling of
[0 .. 255] for each value).
The buttons on the lower right side will
If multiple colors are to be shown (e.g. a palette), names can be given and instead of one uni-colored patch in the top right corner, a grid of colors is presented, which itself is click-sensitive to switch between colors:
This function requires the xfigure class to be working properly!