LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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
  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: 56
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: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
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
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
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
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

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

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

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
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



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



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

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:38 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration