Program © 1998-2024 Guillaume Dargaud.
Free use and distribution.
Last updated on 2021/11/05
"A bus station is where a bus stops. A train station is where a train stops. On my desk I have a workstation..."
GenPalette is a small prog I hacked in an afternoon to produce color palettes for scientific use. It will output a text file with colors written in different ways for compatibility with different programs. It can also output a color palette compatible with JASC Paint-Shop-Pro.
Basically what you do is select a color with the [Color] control, press [Reset] to set it as a starting color (here some kind of brown), select another [Color] and click on the [Canvas]. The prog will interpolate colors between those two.
The interpolation can use either RGB [Scaling] (kind of dull, it's what I used on the left in the example), or HSL scaling (if both colors have the same saturation and lightness then the hue gets scaled, making it more lively). Repeat to operations of selecting [Color] and clicking on the [Canvas] until you get to the bottom of the canvas. You can press [Last] to set the current color precisely to the bottom.
The number of colors is set by the vertical size of the panel window (one color per pixel) or by the [Nb] control. To set it directly to 256 you can click [256].
From there you can copy the canvas for reference with the [>>] button, [Copy] it to the clipboard or save it to a text file.
If you copy it to the [Ref]erence canvas, you can then [Reset] the canvas and pick the colors from the reference just by clicking on it. You can make minor adjustments to colors with [Color][More].
Every time you update the canvas, a file called Palette.txt gets saved in the same directory. This is a text file that uses the format you specified in [Txt Format]. Hex (HTML, C style, separate channels...) and decimal formats are available, and also HSL. [Save as .pal] lets you save to a 256 color palette compatible with Paint Shop Pro, even if the number of colors is different from 256.
You can get help by [Right][Click]ing a control.
This freeware written with LabWindows/CVI.
The images on the left show examples of scalings between various colors (black, white, primaries [RGB] and secondaries [CMY]) using linear RGB and linear HSL. Note that if you want the source code for this, you can get it on my LabWindows/CVI page. Note that using steps versus continuous colors for a graphic often makes it more readable. Pass the mouse over the following lines (requires JavaScript):
RGB | HSL | |
---|---|---|
Linear | 1 | 2 |
8 steps | 3 | 4 |
RGB scaling between 3 colors: HSL scaling between 3 colors: |
Wait for the page to finish loading (it might take a while) and then pass the mouse above the following text to see the respective color scaling images (requires JavaScript).
|
ColorInterim is a small prog similar to GenPalette. Its purpose is to pick an intermediate color between two colors. It's included in the GenPalette installer.
Basically what you do is select the start and end color through various means (color selector, Red/Green/Blue numerics, Hue/Saturation/Lightness numerics or RRGGBB input), then you select the ratio you want between the colors (0 for the start to 100% for the end) and in return you get two intermediate colors, one computed using RGB scaling, the other using HSL scaling.
Various shortcuts are available: [Shift][Click] on a canvas to select the color as a new start color; or [Ctrl][Click] to select it as end color. Click on a canvas to copy the color to the clipboard (as #RRGGBB). Click on the result interim colors to copy them to the clipboard.
You can get help by [Right][Click]ing a control.