Questions tagged [alpha]

An alpha channel determines the transparency of an image or view. Lower values are more transparent, and higher values are more opaque

An alpha channel determines the transparency of an image or view. Lower values are more transparent, and higher values are more opaque

1779 questions
505
votes
7 answers

SVG fill color transparency / alpha?

Is it possible to set a transparency or alpha level on SVG fill colours? I've tried adding two values to the fill tag (changing it from fill="#044B94" to fill="#044B9466"), but this doesn't work.
Ollie Glass
  • 19,455
  • 21
  • 76
  • 107
228
votes
12 answers

How to change the opacity (alpha, transparency) of an element in a canvas element?

Using the HTML5 element, I would like to load an image file (PNG, JPEG, etc.), draw it to the canvas completely transparently, and then fade it in. I have figured out how to load the image and draw it to the canvas, but I don't know how to…
Joe Lencioni
  • 10,231
  • 18
  • 55
  • 66
187
votes
2 answers

Modify alpha opacity of LESS variable

Using LESS, I know that I can change the saturation or tint of a color variable. That looks like this: background: lighten(@blue, 20%); I want to change the alpha opacity of my color, though. Preferably like this: background: alpha(@blue, 20%); Is…
ben
  • 2,037
  • 2
  • 15
  • 16
163
votes
3 answers

Transparent background with three.js

The code work, but I'm having a problem setting transparent background to the canvas with three.js. I use: Background.renderer.setClearColor(0xffffff, 0); But then the background gets black. How do I change it to be transparent? The code: var…
Robert Bue
  • 1,774
  • 2
  • 11
  • 14
160
votes
11 answers

Remove alpha channel in an image

I have an app icon for iOS but Apple doesn't allow alpha to be in the image. How to remove this alpha channel? I only have the png image with me I don't have the source file as my friend did the image for me.
zbz.lvlv
  • 3,597
  • 6
  • 34
  • 38
151
votes
10 answers

Android and setting alpha for (image) view alpha

Is there really no XML attribute counterpart to setAlpha(int)? If not, what alternatives are there?
Ken
  • 30,811
  • 34
  • 116
  • 155
138
votes
3 answers

Setting transparent images background in IrfanView

I have some PNG images which consist of a black shape and a transparent background. Unfortunately, IrfanView shows transparent background as black color, so I see just black on black. I've found in Irfan settings that I can change the window's…
amik
  • 5,613
  • 3
  • 37
  • 62
126
votes
7 answers

Adjust alpha of UIColor

I set a UIColor using rgb to a background of a UILabel. I'm trying to adjust the alpha only. How can I modify the alpha of an existing rgb UIColor? Edit Basically I have UILabels that have a set UIColor (using rgb), and I won't know what color the…
Eric
  • 3,811
  • 5
  • 15
  • 18
112
votes
11 answers

Can PNG image transparency be preserved when using PHP's GDlib imagecopyresampled?

The following PHP code snippet uses GD to resize a browser-uploaded PNG to 128x128. It works great, except that the transparent areas in the original image are being replaced with a solid color- black in my case. Even though imagesavealpha is set,…
Cheekysoft
  • 35,194
  • 20
  • 73
  • 86
100
votes
7 answers

Swift UIView background color opacity

I have a UIView with a UILabel in it. I want the UIView to have white background color, but with an opacity of 50%. The problem whith setting view.alpha = 0.5 is that the label will have an opacity of 50% as well, so I figured out that it maybe…
user2099024
  • 1,452
  • 4
  • 16
  • 26
96
votes
2 answers

How to set opacity of background colour of graph with Matplotlib

I've been playing around with Matplotlib and I can't figure out how to change the background colour of the graph, or how to make the background completely transparent.
user179169
91
votes
4 answers

Merging two images

I need to merge two images (BufferedImage) in Java. It wouldn't be a problem if there was no transparency. The base image already has some transparency. I want to keep this as it is and apply a "mask" to it, the second image. This second image has…
GuilhermeA
  • 1,051
  • 1
  • 13
  • 17
88
votes
9 answers

How to set the opacity/alpha of a UIImage?

I know you can do this with a UIImageView, but can it be done to a UIImage? I want to have the animation images array property of a UIImageView to be an array of the same image but with different opacities. Thoughts?
Marty
  • 5,926
  • 9
  • 53
  • 91
88
votes
10 answers

Android Animation Alpha

I've got animation:
RCH
  • 1,247
  • 1
  • 11
  • 16
81
votes
5 answers

Any way to make plot points in scatterplot more transparent in R?

I have a 3 column matrix; plots are made by points based on column 1 and column 2 values, but colored based on column 2 (6 different groups). I can successfully plot all points, however, the last plot group (group 6) which was assigned the color…
Steve
  • 1,047
  • 1
  • 9
  • 13
1
2 3
99 100