Questions tagged [opacity]

Opacity is the degree to which a graphical object obscures objects which are rendered behind it.

Graphical objects which have a level of opacity less than 100% can be "seen through". The objects which are rendered behind are blended with the object in front; the resulting effect being like looking through a pane of coloured glass.

Opacity appears as an attribute in many graphical contexts, including [3D rendering], and Web Styling.

Opacity is the opposite of .

See also:

2509 questions
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
24
votes
8 answers

Make jquery function run on page load

I have a jquery function to change the opacity of an image on mouse hover to produce a pulsating effect, but I would like to change it so that the image pulsates as soon as the page loads, removing the mouse hover elements mouse over and mouse…
Naz
  • 900
  • 2
  • 10
  • 25
23
votes
8 answers

How can I make my website's background transparent without making the content (images & text) transparent too?

I'm doing a website for a school project, and I'm currently having a small problem... I can't make the body's background transparent without it also affecting the content in it. Here's my HTML code:
KaiZ
  • 391
  • 1
  • 5
  • 13
23
votes
2 answers

How to make a Texture2D 50% transparent? XNA

I'm using SpriteBatch to draw a Texture2D on the screen and was wondering how I could manipulate the the images opacity? Anyone know the best way in accomplishing this?
Tom
  • 1,187
  • 2
  • 12
  • 21
23
votes
2 answers

plotly.py: change line opacity, leave markers opaque

Is it possible to change the line opacity but not the marker opacity? I found that I can set the opacity of the entire line including markers (opacity = .5) and the one of the marker (e.g. marker={"opacity":1}). As shown in this example: import…
stklik
  • 834
  • 1
  • 8
  • 19
22
votes
4 answers

canvas fillStyle in interval with transparent/opacity

This small code clear old canvas data in interval: // start interval ctx.save(); ctx.fillStyle = "rgba(0, 0, 0, 0.2)"; ctx.fillRect(0, 0, ctx.width, ctx.height); ctx.restore(); //some draw code for new graph ... //end interval My work area…
user951114
  • 221
  • 1
  • 2
  • 3
22
votes
3 answers

R Scatter Plot: symbol color represents number of overlapping points

Scatter plots can be hard to interpret when many points overlap, as such overlapping obscures the density of data in a particular region. One solution is to use semi-transparent colors for the plotted points, so that opaque region indicates that…
rbatt
  • 4,677
  • 4
  • 23
  • 41
22
votes
3 answers

How to set transparent background in HTML5 element

I want to set the opacity of an element to 0. Now if i do this, all the content of the element will inherit this property. I don't want this, i just want the background to get the opacity 0 while the content (the text for example) stays visible Any…
Debugger
  • 9,130
  • 17
  • 45
  • 53
21
votes
6 answers

Java - set opacity in JPanel

Let's say I want to make the opacity of a JPanel %20 viewable? I don't mean setOpaque (draw or not draw) or setVisible (show or hide)... I mean make it see-through JPanel.. you know? Is this possible?
test
  • 17,706
  • 64
  • 171
  • 244
21
votes
4 answers

Text Overlay Image with Darkened Opacity React Native

I am attempting to overlay a title over an image - with the image darkened with a lower opacity. However, the opacity effect is changing the overlaying text as well - making it dim. Any fix to this? Here is what is looks like: And here is my code…
Robert Tomas G IV
  • 2,315
  • 4
  • 18
  • 41
21
votes
2 answers

CALayer opacity animation

I want to create a CALayer animation that gives sort of a 'flashy' effect. For that I'm trying to animate the 'opacity' property, but my problem is that I have no idea where to start and how to do it. Here is a graphical explanation of the…
Alex
  • 5,009
  • 3
  • 39
  • 73
20
votes
9 answers

QML Opacity Inheritance

In QML, how can I prevent a child element from inheriting the opacity from its parent? I want to set different opacity values for the parent and it's child element.
aqua boy
  • 419
  • 2
  • 4
  • 7
20
votes
8 answers

How to make UISlider's "track" invisible?

I'm trying to emulate Apple's "Slide to Unlock" feature in my application. I get to this point (image below), but as you can see the UISlider's "track" is visible and is covering up my text. Is there a way to change an attribute programmatically…
sudo rm -rf
  • 29,408
  • 19
  • 102
  • 161
20
votes
6 answers

Gradient opacity on the bottom of div

I would like to create effect like on this image - gradient opacity on the bottom of content: How can i do it?
rafal235
  • 691
  • 2
  • 7
  • 17
19
votes
3 answers

Calculating opacity value mathematically

How is opacity calculated mathematically? There is opacity value in Photoshop, CSS etc. Actually this opacity is the transparent behavior of a layer. That we all know. But how is it calculated mathematically? Is there any equation to calculate…
spider
  • 320
  • 1
  • 2
  • 10