creating color palette using awk or perl

Hi, I'm wondering if anyone have tried creating a color palette or table using awk or perl using a range of values. thanks for any suggestion in advance.

0-0.1: purple
0.1-0.2: blue
0.2-0.3: green
0.3-0.4: yellow
0.4-0.5: orange
> 0.5: red

Happy holidays,:slight_smile:

I'm missing something. Do you mean html color palettes?

An html color is represented either as a hex value of 00->FF for three base color colors:
where 00 is absence of that color and FF is max brightness of that color, e.g.,
black: 000000 or rgb(00,00,00), red: ff0000 rgb(FF, 00, 00)

Usually palletes are displayed with way fewer elements, and they are presented as a sort matrix.

You need an array of 16 million to handle every color, which is not usually a practical approach.

That said what are you trying to do? Exactly? As a guess: Are looking for SDL perl apps?
Simple DirectMedia Layer google for SDL glue.

Hi, I'm working on an image map and basically I need to do a color scale for it. One suggestion for doing this is to have some perl script do it. I dont really have a slightest idea how to go through the process though.

I have attached a sample color scale i intend to recreate . Thanks much.

Is it possible to achieve the same through unix shell script?

Thanks

Hi, I really don't have any idea how to create such. maybe its possible with unix script but not familiar with how to get started. thanks too.

Using colors in Shell Script