25 Years of Programming
An open source source for C, C++, OWL, BASIC, MDB, XLS, DOT, and more...
Home   Projects   Up   Sitemap   Search   Blog   Forum+Chat   About Us   Privacy   Terms of Use   Feedback   FAQ   Images   Services   Payments   Humor   Music  

Online calculator to create and edit 256-color palettes, random or random gradient palettes





Index Edit color code View Color
0  
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
84  
85  
86  
87  
88  
89  
90  
91  
92  
93  
94  
95  
96  
97  
98  
99  
100  
101  
102  
103  
104  
105  
106  
107  
108  
109  
110  
111  
112  
113  
114  
115  
116  
117  
118  
119  
120  
121  
122  
123  
124  
125  
126  
127  
128  
129  
130  
131  
132  
133  
134  
135  
136  
137  
138  
139  
140  
141  
142  
143  
144  
145  
146  
147  
148  
149  
150  
151  
152  
153  
154  
155  
156  
157  
158  
159  
160  
161  
162  
163  
164  
165  
166  
167  
168  
169  
170  
171  
172  
173  
174  
175  
176  
177  
178  
179  
180  
181  
182  
183  
184  
185  
186  
187  
188  
189  
190  
191  
192  
193  
194  
195  
196  
197  
198  
199  
200  
201  
202  
203  
204  
205  
206  
207  
208  
209  
210  
211  
212  
213  
214  
215  
216  
217  
218  
219  
220  
221  
222  
223  
224  
225  
226  
227  
228  
229  
230  
231  
232  
233  
234  
235  
236  
237  
238  
239  
240  
241  
242  
243  
244  
245  
246  
247  
248  
249  
250  
251  
252  
253  
254  
255  

Instructions

The color palette editor allows you to create and edit 256-color palettes, displaying all the colors as you work with them.

To use a random palette as your starting point, click the Get New Random Palette button.

If the Gradient box is cleared, the result is a totally random palette. This is a way to find new colors you like that you might not think of when using a "color chooser" dialog box that only displays a few shades of commonly overused colors.

If the Gradient box is checked, it will be a gradient palette in which the colors migrate gradually and randomly upward in large or small average steps determined by the Gradient Wildness number. The red, green, and blue components migrate independently. When Wildness is set to a high number, large steps are allowed but not necessarily taken, so that, for example, the red and blue components might change by large amounts while the green component only changes slowly. Component independence gives different gradient palettes and their sections different overall hues and character. When each component reaches its highest value (FF or 255), it wraps around to or through 0, to start over and resume its climb. The wrap-around causes the abrupt color shifts delimiting sections of the palette. For fewer abrupt shifts, use a low Wildness value such as 0. High Wildness values such as 1024 can produce some interesting effects (but not every time, so keep trying).

To use your own palette as a starting point, paste its text into the Colors In box. The box accepts two color formats, and it is ok to mix them (but only one format on each line):

  1. #xxxxxx where each "x" is a hexadecimal digit [0-9A-F] is a standard format for defining colors in HTML and CSS. For this program, the leading # is optional. A-F can be upper or lower case. The string is interpreted as #RRGGBB. The first two hex digits define the red component (00-FF, which is the same as 0-255 decimal), followed by the two digits for green and the two for blue. As examples, #000000 is black, #FFFFFF is white, #FF0000 is pure bright red, and #660066 is a dark purple (red and blue, but no green in it).
     
  2. R G B is an alternative format in which the red, green, and blue components are specified as decimal numbers separated by whitespace. 0 0 0 is black, 255 255 255 is white, 255 0 0 is pure bright red, and 102 0 102 is a dark purple (red and blue, but no green in it). R G B is the format used by the popular fractal display program Fractint in its .MAP files.

    On each line, after a legal color definition, it is ok if there is trailing text such as a comment. The program ignores the extra text and removes it (which, however, means that the comments are not preserved and not passed through to the output box).

After pasting your list, click the SendTo--> button to transfer your colors into the editing table. Currently, they are automatically converted to hex format for use by the table. 

In the editing table, you can edit colors individually (currently only in hex format) or perform several actions on the entire color set:

Reverse - reverses the order of the colors in the palette. 

Complement - changes every color to its complementary color. 

Lighten/Darken - for each color, increases/decreases its red, green, and blue components (equally) by the amount given in the "how much" box on the line above. Default = 1. When a color component reaches 0 or 255 (the lowest/highest possible values), it wraps around. If the "how much" box is set to 1 and you click Lighten or Darken 256 times, you end up back where you started.

Rotate - rotates the colors in the palette by the number of positions specified in the "how much" box on the line above. Default = 1. Forward rotation (Rot+) moves each color to a higher index position in the palette. The highest color wraps "off the end" and back around to index position 0. Backwards rotation (Rot-) moves each color down to a lower index position in the palette. The color at index position 0 drops "off the bottom" and wraps up to index position 255. 

The "how much" box - modifies the action buttons as described above. The box only accepts positive numbers. How the number is interpreted depends on which button you click.

The Dups button - searches the palette for duplicate colors, marks the checkbox next to each, and reports the number of duplicates.  

At any time, you can click the <--GetFrom button to transfer the colors from the editing table into the Colors Out box. If needed, you can then convert them to decimal format with the ToRGB button. 

Notes

  • All of the editor's functionality is provided by Javascript. Timing results on my 8-year-old PC:
    In Firefox 12, generating a random palette takes less than 1 second.
    In Internet Explorer 8, it takes about 30 seconds, long enough for the little white "I've become unresponsive" icon to appear in the upper left window corner, but it does eventually complete.
    In Firefox 3.0 (in Ubuntu Linux), it also takes a long time. There is some compensating entertainment (at first, anyway) in watching the table rows slowly adjust their size to fit their contents.
     
  • There are some potentially useful operations that the editor doesn't yet support. Some can be accomplished by imaginatively using a combination of this editor, the online regular expression text editor, and manual editing in any text editor (it helps if it shows line numbers). 
     
  • One of the reasons I created this editor was to try creating custom gradient palettes for my IFS fractal image design page and some other similar graphics calculators that are planned.
     
  • Please submit any bug reports, feature suggestions, or other feedback in the Discussion Forum.

 


 

Valid HTML 4.01 Transitional
Yahoo! Search
Search the web Search this site
Valid CSS