Sponsored Content
Top Forums Shell Programming and Scripting creating color palette using awk or perl Post 302584421 by ida1215 on Friday 23rd of December 2011 07:23:46 AM
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
 

4 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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
create_color_table(3alleg4)					  Allegro manual				       create_color_table(3alleg4)

NAME
create_color_table - Fills a color mapping table for customised effects. Allegro game programming library. SYNOPSIS
#include <allegro.h> void create_color_table(COLOR_MAP *table, const PALETTE pal, void (*blend)(PALETTE pal, int x, int y, RGB *rgb), void (*callback)(int pos)); DESCRIPTION
Fills the specified color mapping table with lookup data for doing customised effects with the specified palette, calling the blend func- tion to determine the results of each color combination. Your blend routine will be passed a pointer to the palette and the two indices of the colors which are to be combined, and should fill in the RGB structure with the desired result in 0-63 format. Allegro will then search the palette for the closest match to the RGB color that you requested, so it doesn't matter if the palette has no exact match for this color. If the callback function is not NULL, it will be called 256 times during the calculation, allowing you to display a progress indicator. Example: COLOR_MAP greyscale_table; ... void return_grey_color(const PALETTE pal, int x, int y, RGB *rgb) { ... } ... /* Build a color lookup table for greyscale effect. */ create_color_table(&greyscale_table, pal, return_grey_color, NULL); SEE ALSO
color_map(3alleg4), create_light_table(3alleg4), create_trans_table(3alleg4), create_blender_table(3alleg4), draw_trans_sprite(3alleg4), draw_lit_sprite(3alleg4), draw_gouraud_sprite(3alleg4), rgb_map(3alleg4), excolmap(3alleg4) Allegro version 4.4.2 create_color_table(3alleg4)
All times are GMT -4. The time now is 02:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy