creating color palette using awk or perl


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting creating color palette using awk or perl
# 1  
Old 12-23-2011
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.
Code:
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,Smilie
# 2  
Old 12-24-2011
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.
# 3  
Old 12-25-2011
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 creating color palette using awk or perl-colorscalepng. Thanks much.
# 4  
Old 12-25-2011
Is it possible to achieve the same through unix shell script?

Thanks
# 5  
Old 12-25-2011
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.
# 6  
Old 12-26-2011
Login or Register to Ask a Question

Previous Thread | Next Thread

4 More Discussions You Might Find Interesting

1. Programming

Perl: restrict perl from automaticaly creating a hash branches on check

My issue is that the perl script (as I have done it so far) created empty branches when I try to check some branches on existence. I am using multydimentional hashes: found it as the best way for information that I need to handle. Saing multidimentional I means hash of hashes ... So, I have ... (2 Replies)
Discussion started by: alex_5161
2 Replies

2. Shell Programming and Scripting

color print using perl

Hi i want to print the text in different color using perl script. i am able to print on console(terminal). but if i try to print the same into a file, i am not able to do color.pl #!/bin/usr/perl use Term::ANSIColor; print "This text is normal.\n"; use Term::ANSIColor qw(:constants);... (3 Replies)
Discussion started by: roopa
3 Replies

3. Shell Programming and Scripting

how to get the Format header in perl in different color

Now here is the problem how to get the Format header in perl in different color. format RPT_TOP= DINISO EXECUTION REPORT @<<<<<<<<<<<<< AGAINST SEOPACTUAL Page : @>>> $TODAY,$%... (3 Replies)
Discussion started by: rrd1986
3 Replies

4. UNIX for Dummies Questions & Answers

Unix Web color palette???

Please Help! I have supplied graphics files which are being used on the web with the specified RGB web-safe color palette. However, the person using them is saying that that same color palette displays the colors differently on Unix systems. I need to provide a solution, but I know... (1 Reply)
Discussion started by: jmaxmad
1 Replies
Login or Register to Ask a Question