Questions tagged [gradient]

Specifies a range of position-dependent colors, usually used to fill a region.

Specifies a range of position-dependent colors, usually used to fill a region.

enter image description here

4271 questions
112
votes
10 answers

Gradients in Internet Explorer 9

Does anyone know the vendor prefix for gradients within IE9 or are we still supposed to still be using their proprietry filters? What I've got for the other browsers is: background-image: -moz-linear-gradient(top, #444444, #999999); /* FF3.6…
Sniffer
  • 6,242
  • 10
  • 45
  • 53
95
votes
4 answers

How do I programmatically set the background color gradient on a Custom Title Bar?

There are many tutorials out there and questions on SO that implement custom title bars. However, in my custom title bar I have a custom gradient for the background and I would like to know how to set it dynamically in my code. Here is where my…
AngeloS
  • 5,536
  • 7
  • 40
  • 58
89
votes
8 answers

Can I apply a gradient along an SVG path?

I'd like to put a simple loading indicator on my website that's triggered by a script. It should be a simple circle arc that's got a gradient and is spinning while the user is waiting. I haven't tried the animation part, but got stuck on the static…
ygoe
  • 18,655
  • 23
  • 113
  • 210
88
votes
7 answers

Android: Using linear gradient as background looks banded

I'm trying to apply a linear gradient to my ListView. This is the content of my drawable xml:
Francesco Laurita
  • 23,434
  • 8
  • 55
  • 63
86
votes
5 answers

Using CSS, can you apply a gradient mask to fade to the background over text?

I have a full screen fixed background image. I would like the text in my scrolling div to fade out at the top, presumably by applying a gradient mask to the background at only the top part of the div. I'm interested in having the text look like it…
aviemet
  • 1,463
  • 1
  • 15
  • 19
84
votes
5 answers

CSS gradient checkerboard pattern

I want to create a checkerboard pattern using gradients. I've found an example and modified it to my needs, however it only works with -moz prefix. When I remove the -moz prefix, the pattern is completely different. How can I make this -moz…
Maciej Krawczyk
  • 14,825
  • 5
  • 55
  • 67
82
votes
5 answers

angle attribute in android gradient

I am going through test example. Where for some Image background they are using gradient, the code goes like this
Sharanabasu Angadi
  • 4,304
  • 8
  • 43
  • 67
80
votes
7 answers

wrapping Scaffold with Container for gradient background, How to set gradient to container background in flutter?

I'd like to wrap a Scaffold with a Container in order to get a gradient background that's also underneath the AppBar. Basically a full screen gradient background. However, my attempt doesn't do anything. Is there another way of doing it, where I can…
dan
  • 1,292
  • 2
  • 10
  • 16
80
votes
3 answers

How to make transparent gradient?

I have the following gradient:
Sheehan Alam
  • 60,111
  • 124
  • 355
  • 556
74
votes
5 answers

Use css gradient over background image

I've been trying to use a linear gradient on top of my background image in order to get a fading effect on the bottom of my background from black to transparent but can't seem to be able to make it show. I've read other cases here and examples but…
Pam
  • 4,060
  • 3
  • 19
  • 17
72
votes
10 answers

How to create colour gradient in Python?

I want to create a new colormap which interpolates between green and blue (or any other two colours for that matter). My goal is to get something like: First of all I am really not sure if this can be done using linear interpolation of blue and…
Dipole
  • 1,840
  • 2
  • 24
  • 35
70
votes
7 answers

How to plot a gradient color line

To state it in a general form, I'm looking for a way to join several points with a gradient color line using matplotlib, and I'm not finding it anywhere. To be more specific, I'm plotting a 2D random walk with a one color line. But, as the points…
PDRX
  • 1,003
  • 1
  • 11
  • 15
65
votes
15 answers

Javascript color gradient

Using javascript with or without Jquery, I need to a create a gradient of colours based on a start and finish color. Is this possible to do programmatically? The end colour is only ever going to be darker shade of the start colour and it's for an…
Dave
  • 651
  • 1
  • 5
  • 3
61
votes
2 answers

How to set gradient style to paint object?

The code for drawing an arrow with Style: Fill is given below: paint.setColor(Color.parseColor("#bdc0dc")); paint.setStyle(Style.FILL); canvas.drawPath(arrowPath,…
Rohan K
  • 1,608
  • 4
  • 21
  • 32
60
votes
4 answers

Android Jetpack compose gradient

Is it possible to draw a gradient over an image drawable using Jetpack Compose? fun HeroCover() { Column { val image = +imageResource(R.drawable.edge_of_tomorrow_poster) Container(modifier = Height(440.dp) wraps Expanded) { …
AouledIssa
  • 2,528
  • 2
  • 22
  • 39