gradient

Google Now gradient/shadow on status bar & navigation bar

青春壹個敷衍的年華 提交于 2019-12-04 02:16:33
I'm trying to make a similar status bar and navigation bar gradient as Google Now. Image Reference: Rectangular area indicated as below After trying the below option on Android Marshmallow, <item name="android:windowTranslucentNavigation">true</item> <item name="android:windowTranslucentStatus">true</item> I get the below behaviour Image Reference: Can anyone suggest me how to get gradient on both these ? Is that a gradient or is that a shadow ? Bryan It is a gradient being used as a scrim . To achieve this effect, the first thing you have to do is remove the semi-transparent underlay for the

Gradient fill for geom_bar scaled relative to each bar and not mapped to a variable

不想你离开。 提交于 2019-12-04 01:05:47
My goal is to reproduce this plot, and my problem is reproducing the gradient fill in each bar. ADDED after COMMENT The good comment of @PavoDive directs us to a question that basically says "You can't do it with ggplot2 and furthermore it is a bad idea even if you could do it." Agreed as to it being a poor graphical choice, but for didactic purposes I wanted to re-create the original and then show improvements. So, is there a programming solution nevertheless? With the data that follows the ggplot code I have gotten close, other than the consistent gradient coloring that is the same for each

Creating a Gradient Torus in HTML/CSS [closed]

偶尔善良 提交于 2019-12-03 22:23:02
Closed. This question is off-topic. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . Simply put, I need to put a gradient on a dynamically sized circle with a transparent background. Is there a way to recreate the following image in CSS/HTML ? As far as I can tell, neither radial gradients nor border-images are able to construct this shape. The key is that the center of the circle needs to be transparent, as I can not "fake" a torus by filling the center with white. Update: This

Creating a CSS linear gradient based on two points relative to a rectangle

为君一笑 提交于 2019-12-03 22:00:41
问题 I am trying to recreate the gradient tool in Sketch. The tool in Sketch is using two points with different colors to define a gradient: I want the output to be in the form of a CSS linear gradient value. The way a CSS linear gradient is constructed is an angle and x number of color stops with a color and a percentage defined: https://developer.mozilla.org/en-US/docs/Web/CSS/linear-gradient So I want to convert two points relative to the rectangle in which the gradient should be rendered to

SVG polar gradients

血红的双手。 提交于 2019-12-03 16:06:28
I'm a beginner at SVG, but I'd like to learn some techniques. To be short, is there a simple way to create something like this? I was thinking about creating a polar gradient and then clipping it: But how do I generate a polar gradient? Even if there's no native method, maybe it could be made with a simple linear gradient and then using some rectangular-polar coordinate transformation. Is there a way to do so? So this is the solution I developed: <?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg viewBox

How do I combined CSS text-shadow and “background-image: -webkit-gradient”

ぃ、小莉子 提交于 2019-12-03 15:33:26
问题 I am trying to achieve a gradient + text shadow effect in Chrome/Safari using CSS text-shadow and a combination of text-shadow and background-image: -webkit-gradient, see example blw. I can only make one of the effects apply(if I add the shadow the gradient disappears. What am I doing wrong? h1 { font-size: 100px; background-image: -webkit-gradient(linear, left top, left bottom, from(white), to(black)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; text-shadow: 0 1px

Rounded rect with Gradient color

时光毁灭记忆、已成空白 提交于 2019-12-03 14:58:52
I have not really done much programming with Core Graphics. And I tend to stick with QuartzCore now that it does a lot of what I need through the layer property :) However, I have a UIView, which is currently gradient. I'd like to add rounded corners to this UIView and the layer property does not do this when I draw the gradient: - (void)drawRect:(CGRect)rect { CGContextRef currentContext = UIGraphicsGetCurrentContext(); CGGradientRef glossGradient; CGColorSpaceRef rgbColorspace; size_t num_locations = 2; CGFloat locations[2] = { 0.0, 1.0 }; CGFloat components[8] = { 1.0, 1.0, 1.0, 0.95, //

One SVG file, many SVG gradients inside

喜夏-厌秋 提交于 2019-12-03 12:58:57
I’m making a set of buttons which use dynamic gradients. I’ve taken care of Firefox 3.6+ and WebKit by using their proprietary CSS extensions and all I need to do is support Opera, iOS and IE9 by using background-image: url("gradient.svg"). This is relatively easy, I made an SVG file, linked it and got it working. However, I’m making a set so I need at least 6 gradients. When I normally do it in images, I create a sprite for fast HTTP access. I’m not sure how to achieve this in SVG – can I use one file and access different parts of its XML by using #identifiers, like XBL does? My current SVG:

HTML/CSS Gradient that stops at a particular height and continues further with a solid color

南笙酒味 提交于 2019-12-03 10:39:21
问题 I want to have a gradient in HTML/CSS. Assume some DIV is always more than 400px tall. I want to add the gradient so that it is #FFFFFF at the top and #EEEEEE at 300px. So the first 300px (height-wise) is a nice 'white to grey' gradient. After 300px, regardless of how tall the DIV goes, I want the background color to stay #EEEEEE. I guess this has something to do with gradient stops (?) How can I do it? P.S. If it is not possible in IE I don't care. I am fine if gecko and webkit browsers show

Is there an “official”/standard CSS3 gradient syntax?

隐身守侯 提交于 2019-12-03 09:59:57
I know there is -webkit-gradient and -moz-linear-gradient . But what is the standard way of defining a gradient? Like there is: -webkit-border-radius and -moz-border-radius and the standard is meant to be border-radius . An update for 2011, the Mozilla syntax is now the 'official' one, adopted by the CSS3 Image Values and Replaced Content Working Draft . Webkit has been updated to use this syntax too, and this has now been incorporated into the latest versions of Chrome and Safari. Kyle Not yet, the two examples you provided are the only coded gradients available as yet, as far as I know. Most