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
8
votes
3 answers
Load RGBA bitmap with PIL
I tried to convert a 32-bit Bitmap to 32-bit PNG using PIL.
from PIL import Image
im = Image.open('example.bmp')
print im.mode
# it prints 'RGB', but expected was 'RGBA'
im.save('output.png', format='PNG')
The expected image mode is 'RGBA', but…

stanleyxu2005
- 8,081
- 14
- 59
- 94
7
votes
2 answers
Greenish image with BGRA to YUV444 conversion using DirectX11 pixel shader
I'm new to HLSL. I am trying to convert color space of an image captured using DXGI Desktop Duplication API from BGRA to YUV444 using texture as render target.
I have set my pixel shader to perform the required transformation. And taking the…

Balakrishna Avulapati
- 231
- 2
- 21
7
votes
4 answers
How to handle alpha in a manual "Overlay" blend operation?
I'm playing with some manual (walk-the-pixels) image processing, and I'm recreating the standard "overlay" blend. I'm looking at the "Photoshop math" macros here:
http://www.nathanm.com/photoshop-blending-math/
(See also here for more readable…

Ben Zotto
- 70,108
- 23
- 141
- 204
7
votes
1 answer
What is PixelFormat.RGBX_888
As the title said, anyone know what is RGBX_8888 pixel format? and what is the difference with RGBA_8888? Is RGBA_8888 offers an alpha channel but RGBX_8888 does not?
The android documentation does not give much information on this…

CodingBird
- 705
- 2
- 11
- 22
7
votes
1 answer
OpenCV Android Green Color Detection
currently I'm making an app where user will detect green colors. I use this photo for testing:
My problem is that I can not detect any green pixel. Before I worked with blue color and everything worked fine. Now I can't detect anything though I…

Oleksandr Firsov
- 1,428
- 1
- 21
- 48
7
votes
2 answers
Using the Color package to create new Color from RGB value?
I'm trying to create a new Color object using RGB values I have in variables:
http://golang.org/pkg/image/color/
package main
import (
"fmt"
"image"
_ "image/gif"
_ "image/jpeg"
_ "image/png"
"os"
)
func main() {
…

sergserg
- 21,716
- 41
- 129
- 182
7
votes
1 answer
Convert RGBA to RGB taking background into consideration
Possible Duplicate:
Convert RGBA color to RGB
I'm trying to convert a RGBA color, with a alpha < 1 into a solid RGB representation taking into account the background color.
Using the algorithm provided at this question I manage to get correct…

seeSaw
- 73
- 1
- 5
7
votes
2 answers
Convert RGBA color to HTML color code
I have a color picker in my application that users can use to pick colors of certain objects that the application outputs. The color picker is outputting the color chosen in RGBA format. However, I need the HTML color code. I need to be able to…

Nathan
- 1,135
- 2
- 12
- 27
7
votes
2 answers
How to set html input field transparent on a transparent div?
I have a div set transparent with rgba and want on that div an input field which also has a transparent background. The problem is that the input field background is not rendered transparent.
It works if I use opacity:0.8; on the div but than also…

Nathanael
- 361
- 1
- 3
- 12
6
votes
2 answers
Getting and setting the RGB / RGBA value of a pixel in a CCSprite (cocos2d-x)
Why do I need this?
Basically I need to turn a color image into gray-scale. Including a gray-scale version of the image could be a solution, but space is tight in my situation - I don't want my APK to be too big. Besides, I would like to work on the…

Siu Ching Pong -Asuka Kenji-
- 7,943
- 8
- 53
- 74
6
votes
17 answers
regex javascript to match both RGB and RGBA
Currently I have this regex which matches to an RGB string. I need it enhanced so that it is robust enough to match either RGB or RGBA.
rgbRegex = /^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/; //matches RGB
http://jsfiddle.net/YxU2m/
var rgbString = "rgb(0,…

fortuneRice
- 4,214
- 11
- 43
- 58
6
votes
2 answers
CSS linear-gradient and Canvas linear-gradient aren't the same with opacity settings
I want to achieve the same linear gradient look defined by CSS on a canvas. Used a method that works great until no transparency setting is used. When there are rgba color values defined with the same linear gradient color settings the results…

M.Ervin
- 61
- 2
6
votes
1 answer
is jquery converting rgba to rgb automatically?
I'm new to jquery and i'm a bit surprised: when I write
$('#selected-color').css('background-color', 'rgba(0,0,0,1)');
My final style of #selected-color ends up being rgb(0,0,0). This makes a big difference when I get the background-color back and…

Clement
- 281
- 1
- 2
- 8
6
votes
3 answers
Convert RGBA{U8}(0.384,0.0,0.0,1.0) to Integer
I am using Images.jl in Julia. I am trying to convert an image into a graph-like data structure (v,w,c) where
v is a node
w is a neighbor and
c is a cost function
I want to give an expensive cost to those neighbors which have not the same…

Ivan Felipe Rodríguez
- 189
- 16
6
votes
2 answers
Chrome slightly changes alpha-value of RGBA color after setting it
Please consider the following snippet:
var el = document.getElementById('x');
el.style.backgroundColor = "rgba(124, 181, 236, 0.25)";
alert(el.style.backgroundColor);
Testing
On Windows 8.1 this gives back the exact input for…
Jeroen
- 60,696
- 40
- 206
- 339