RGBA stands for Red-Green-Blue-Alpha and specifies a color using four values which represent the amount of red, green, blue and alpha (opacity) in the color.
Questions tagged [rgba]
538 questions
28
votes
3 answers
CSS RGBA border / background alpha double
I'm working on a website that has a lot of transparency involved, and I thought I would try to build it entirely in RGBA and then do fallbacks for IE. I need a "facebox" style border effect, where the outer border is rounded and is less opaque than…

stockli
- 558
- 1
- 4
- 11
26
votes
2 answers
Python from color name to RGB
If I have a function which takes color as an input to be edited first (by RGB numbers), and then used in matplotlib.pyplot. How can I convert color name to RGB?
For example:
def function(color):
color[3] = 0.5
plt.plot([1,2],[2,4], color =…
user9885031
24
votes
2 answers
Convert 8-digit hex colors to rgba colors?
Everything I've found on this subject simply converts the hex to rgb and then adds an alpha of 1. I want to get the intended alpha from the hex digits as well.
A color such as #949494E8 or #DCDCDC8F clearly has an alpha value that's not 0 or 1.

Steve
- 14,401
- 35
- 125
- 230
24
votes
4 answers
What is the difference between opacity and that through alpha channel (rgba)?
div { background-color: rgb(255,0,0); opacity: 1; }
div { background-color: rgba(255,0,0,1); }
What is the difference between the above two?

Sreehari K M
- 555
- 2
- 5
- 24
21
votes
3 answers
How to mix two ARGB pixels?
How can I mix two ARGB pixels ?
Example
Here A is (Red with Alpha) and B is ( Blue with Alpha ).

SunnyShah
- 28,934
- 30
- 90
- 137
20
votes
7 answers
How to extract r, g, b, a values from CSS color?
What would be the easiest way to transform
$('#my_element').css('backgroundColor')
to object like this:
{ r: red_value, g: green_value, b: blue_value, a: alpha_value }
?

Misha Moroshko
- 166,356
- 226
- 505
- 746
20
votes
3 answers
Convert RGB color value to RGBA at 0.75 alpha
I have the following code to get the background color of an element.
var currentColor = $(this).css('background-color');
which returns something like rgb(123,123,123)
What I now want to do convert this to rgba and show it at 0.75 alpha
So returning…

Tom
- 12,776
- 48
- 145
- 240
20
votes
3 answers
How can I stop the alpha-premultiplication with canvas imageData?
Is there a way to stop the premultiplication of the alpha channel for canvas data, or a workaround?
I want to generate an image (in this case some random rgba values) and save the canvas as an image.
During the second step, I want to compare the…

Newbie
- 1,644
- 5
- 29
- 40
19
votes
3 answers
LESScss converting rgba to hex? how to nest color variables into a mixin?
Does LESScss convert all rgba colors to hex values?
I am trying to create a mixin, say, .color, that allows you to pass in a color variable previously defined, and I want it to be in rgba.
this doesn't work, but here's the…

Elyse Holladay
- 610
- 1
- 5
- 10
17
votes
1 answer
how to set rgb color in android?
I am trying to set text background color using text1.setBackgroundColor(Color.rgb(r,g,b));
were red,green,blue values are coming from database based on value i set r=128,g=255,b=128 programmatically it color was dull green but i run the program it…

ibu
- 577
- 4
- 9
- 24
15
votes
3 answers
ChartJS canvas not displaying rgba colors in IE, Safari and Firefox
Im using ChartJS to display some data but it's not rendering the canvas element correctly in IE, Firefox and Safari.
My guess is that the background color property lacks any of the used prefixes for the other browser since it works fine in…

andromedainiative
- 4,414
- 6
- 22
- 34
13
votes
1 answer
rawvideo and rgb32 values passed to FFmpeg
I'm converting a file to PNG format using this call:
ffmpeg.exe -vframes 1 -vcodec rawvideo -f rawvideo -pix_fmt rgb32 -s x -i infile -f image2 -vcodec png out.png
I want to use a converter that can be linked or compiled into a…

Brian
- 1,351
- 2
- 15
- 29
13
votes
1 answer
What does a correct call to CGImageCreate look like if the data provider for it uses an array created by the app?
I'm trying to create a bitmap in memory as part of a pattern function that a drawLayer:inContext: method (this method is part of the CALayer delegate protocol) will call. The pattern function looks similar to this:
static const size_t…

Jim
- 1,014
- 1
- 11
- 22
13
votes
9 answers
IE8 gradient filter not working if a background color exists
I'm trying to use the following CSS styles. They are working on most browsers, including ie7. However in ie8, the transparent background does not show and instead I get the background color which I would like to leave set as a fallback…

gxc
- 4,946
- 6
- 37
- 55
12
votes
3 answers
Cross browser rgba transparent background while keeping content (text & images) non-transparent
I want to get rgba backgrounds working with all browsers. I did some searching and found out that generally there are three types of browsers out there:
1) Browsers that support rgba.
2) Internet Explorer that supports rgba via bizarre '-ms-filter'…

Mikk
- 2,209
- 3
- 32
- 44