Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

sdl::color(3pm) [debian man page]

pods::SDL::Color(3pm)					User Contributed Perl Documentation				     pods::SDL::Color(3pm)

NAME
SDL::Color - Format independent color description CATEGORY Core, Video, Structure SYNOPSIS
my $black = SDL::Color->new(0, 0, 0); my $color = SDL::Color->new(255, 0, 0); my $r = $color->r; # 255 my $g = $color->g; # 0 my $b = $color->b; # 0 $color->g(255); $color->b(255); # $color is now white DESCRIPTION
"SDL_Color" describes a color in a format independent way. METHODS
new my $color = SDL::Color->new(255, 0, 0); The constructor creates a new color with the specified red, green and blue values. r my $r = $color->r; $color->r(128); If passed a value, this method sets the red component of the color; if not, it returns the red component of the color. g my $g = $color->g; $color->g(128); If passed a value, this method sets the green component of the color; if not, it returns the green component of the color. b my $b = $color->b; $color->b(128); If passed a value, this method sets the blue component of the color; if not, it returns the blue component of the color. SEE ALSO
SDL::Surface AUTHORS
See "AUTHORS" in SDL. perl v5.14.2 2012-05-28 pods::SDL::Color(3pm)

Check Out this Related Man Page

SDL::Color(3)						User Contributed Perl Documentation					     SDL::Color(3)

NAME
SDL::Color - a SDL perl extension SYNOPSIS
$color = new SDL::Color ( -r => 0xde, -g => 0xad, -b =>c0 ); $color = new SDL::Color -surface => $app, -pixel => $app->pixel($x,$y); $color = new SDL::Color -color => SDL::NewColor(0xff,0xaa,0xdd); DESCRIPTION
"SDL::Color" is a wrapper for display format independent color representations, with the same interface as SDL::Color. new ( -color => ) "SDL::Color::new" with a "-color" option will construct a new object referencing the passed SDL_Color*. new (-r => , -g => , -b => ) "SDL::Color::new" with "-r,-g,-b" options will construct both a SDL_Color structure, and the associated object with the specified vales. new (-pixel =>, -surface =>) "SDL::Color::new" with "-pixel,-surface" options will generate a SDL_Color* with the r,g,b values associated with the integer value passed by "-pixel" for the given "-surface"'s format. r ( [ red ] ), g( [ green ] ), b( [ blue ] ) "SDL::Color::r, SDL::Color::g, SDL::Color::b" are accessor methods for the red, green, and blue components respectively. The color value can be set by passing a byte value (0-255) to each function. pixel ( surface ) "SDL::Color::pixel" takes a "SDL::Surface" object and r,g,b values, and returns the integer representation of the closest color for the given surface. AUTHOR
David J. Goehrig SEE ALSO
perl SDL::Surface perl v5.12.1 2010-07-05 SDL::Color(3)
Man Page

14 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

auto setterm

I need to change color of text in shell. I do it like that #setterm -foreground green -store but when I reboot computer color changes to default, how to make it autochange color (3 Replies)
Discussion started by: Ty3
3 Replies

2. UNIX for Dummies Questions & Answers

Print in color

I have a short code below: awk 'NR==1 {printf "'$information'-MYDATA-'$information' \n"} {print $0}' data.file > newdata.file I want the "information" color in RED and MYDATA in BLUE. How can I do it? Please help!!!! (3 Replies)
Discussion started by: bobo
3 Replies

3. UNIX for Advanced & Expert Users

Changing Text Color Using VT100

Hi, I want to change the color of the text. Currently, I am using the following VT100 command, which changes the color of the foreground: <ESC>[{attr1};...;{attrn}m The problem is, when I change the color of the foreground, it changes the color of the text as expected, but it also... (4 Replies)
Discussion started by: Abed Alnaif
4 Replies

4. UNIX for Dummies Questions & Answers

Help on file arrangement

Can anyone help me on this. I have a file that looks like this: color red green blue color pink yellow number one two gender male gender female The output would look like this: color red green blue pink yellow number one two gender male female I have over 5000 rows and i dont want... (5 Replies)
Discussion started by: kharen11
5 Replies

5. Shell Programming and Scripting

How to have color coded Terminal display,(like linux)

Hi all, I would like to know how to have a color display in the terminal... In the sense that, In many linux terminals,we have color coded for each file type, green for executable ,blue for dirs and so on... I wanted to know how i can have the same arrangement in solaris(b-79a) I am not... (5 Replies)
Discussion started by: wrapster
5 Replies

6. Shell Programming and Scripting

text color

Hi all I have a file contains columns showing figures as below : Input file A B C D 50 60 90 E 100 20 53 F 30 40 70 G 25 27 45 I want to color the value above or equal 90 by red and to be shown as below output file... (5 Replies)
Discussion started by: Bluetoot
5 Replies

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

8. Shell Programming and Scripting

zsh, prompt, variable expansion, ANSI color sequences

Hi! I am using latest ZSH and I have setopt prompt_subst I have a global hash array variable which contains some color definitions with color names as keys and 256-color ANSI codes (with %{ and %}) as values, eg %{\ePS1="$FG Hello World (%M) > " or PS1=$'$FG Hello World (%M) > ' then it... (3 Replies)
Discussion started by: galanom
3 Replies

9. Shell Programming and Scripting

Assign specific Color to the outputs in script

Hi, Im programming an interactive menu that verifies the exports of my oracle DB, and im having some trouble finding a process that outputs for example a green command line when the export terminated successfully. i have something like this cat... (15 Replies)
Discussion started by: blacksteel1988
15 Replies

10. Shell Programming and Scripting

Non-greedy replacing in vim

I have the following lines: {color:#000000}blabla{color} {color:#000000}moreblabla{color} {color:#000000}even more blabla{color}I tried the following line in vim to get rid of all the {} tags: :%s/{.*\{-}}//gBut vim complains: "invalid command" What am I doing wrong? EDIT: this... (4 Replies)
Discussion started by: awayand
4 Replies

11. UNIX for Dummies Questions & Answers

Adding Color using More

Daily Stupid Question: When I use a cat with a grep I can see "blind SQL injection vulnerablity" highlighted as red and is easily readable cat file |grep -i 'blind\ SQL\ injection\ vulnerability' When I add a more to view the results page at a time, the color is taken away and is... (3 Replies)
Discussion started by: metallica1973
3 Replies

12. UNIX for Dummies Questions & Answers

Full Color Command Line Menus

Hi all, Did a couple of Google searchs, a couple of searchs on the site here and didn't find an answer... But, maybe I'm not searching for the right phrases. My question; what creates the full color menus on the command line in unix? I'm looking for something that would replicate the... (3 Replies)
Discussion started by: jtollefson
3 Replies

13. Web Development

Color a Badge Based on the Weeks the Member is Active in the Latest Sequence

Hi Ravinder, Could you (and anyone else who wants to help out) check this PHP code and confirm it does what I expect it to do, which is to color a badge based on the weeks a member is active in the latest sequence? I did a cut-paste-change from my "days in sequence" PHP prototype script and it... (6 Replies)
Discussion started by: Neo
6 Replies

14. Ubuntu

Using color in scripts

This is supposed to colorize. But it outputs this 3 GREEN='3; then echo -e "${GREEN}File exists.${RESET}" else echo -e "${RED}File does NOT exist.${RESET}" fi (18 Replies)
Discussion started by: drew77
18 Replies