LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 03-08-2010, 08:48 PM   #1
Kenny_Strawn
Senior Member
 
Registered: Feb 2010
Location: /usa/ca/orange_county/lake_forest
Distribution: ArchBang, Google Android 2.1 + Motoblur (on Motortola Flipside), Google Chrome OS (on Cr-48)
Posts: 1,791
Blog Entries: 62

Rep: Reputation: 54
The 'A' in RGBA: What does it mean?


I know about Red, Green, and Blue, but I'm not so sure about the 'A'. What does it really mean?

I want to know this for this code:

Code:
int rgba (int Red, int Green, int Blue, int <WhateverTheAStandsFor>)
{
    return;
};
Essentially, I want to be able to use this code to fine-tune RGBA to my preferences, not just with "true" and "false", but with in-between options, so that I can control how transparent or opaque the desktop is going to be.

And I will do this with C++, not original C, unlike the existing Gtk RGBA module.
 
Old 03-08-2010, 08:51 PM   #2
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 451Reputation: 451Reputation: 451Reputation: 451Reputation: 451
Quote:
Originally Posted by Kenny_Strawn View Post
I know about Red, Green, and Blue, but I'm not so sure about the 'A'. What does it really mean?

I want to know this for this code:

Code:
int rgba (int Red, int Green, int Blue, int <WhateverTheAStandsFor>)
{
    return;
};
Essentially, I want to be able to use this code to fine-tune RGBA to my preferences, not just with "true" and "false", but with in-between options, so that I can control how transparent or opaque the desktop is going to be.

And I will do this with C++, not original C, unlike the existing Gtk RGBA module.

http://en.wikipedia.org/wiki/RGBA_color_space - are all your WEB search engines blocked ?
 
Old 03-09-2010, 10:26 PM   #3
sundialsvcs
Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,045

Rep: Reputation: 953Reputation: 953Reputation: 953Reputation: 953Reputation: 953Reputation: 953Reputation: 953Reputation: 953
Briefly... the fourth channel ("A") is Alpha, which represents transparency.

A pixel with A=1.0 is "solid." A=0.0 is invisible. A=0.5 is a translucent "ghost."

This channel of information is used when blending multiple "layers" of material into a single image.
 
Old 03-09-2010, 10:53 PM   #4
John VV
Guru
 
Registered: Aug 2005
Posts: 12,078

Rep: Reputation: 1574Reputation: 1574Reputation: 1574Reputation: 1574Reputation: 1574Reputation: 1574Reputation: 1574Reputation: 1574Reputation: 1574Reputation: 1574Reputation: 1574
please use Google before posting

Alpha Chanel, for transparency
 
Old 03-10-2010, 10:40 AM   #5
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266
Yeah, and that's why there is no real 32-bit color, it's 24-bit color + 8-bit alpha channel.
 
Old 03-10-2010, 10:43 PM   #6
sundialsvcs
Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,045

Rep: Reputation: 953Reputation: 953Reputation: 953Reputation: 953Reputation: 953Reputation: 953Reputation: 953Reputation: 953
That depends upon your particular display hardware.

Remember... "RGB(A)" is simply a color space, just like CMYK and HSV(A). It is an agreed-upon method of representing color. The integer (or, as the case may be, floating-point) domain of each value can vary from file to file, application to application, or device to device.

The essence of "RGBA" is that "a color value is expressed by a 4-tuple {r,g,b,a}." That's it. That's all.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RGBA in GNOME Shell Kenny_Strawn Linux - Desktop 3 06-16-2010 09:34 AM
RGBA in GNOME's menus Kenny_Strawn Linux - Desktop 3 03-04-2010 06:01 AM
Enable RGBA in gnome-panel Kenny_Strawn Ubuntu 2 03-01-2010 06:27 PM


All times are GMT -5. The time now is 10:42 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration