gradient

Can you add noise to a CSS3 gradient?

戏子无情 提交于 2019-11-26 21:55:37
Is it possible to add noise to a gradient in CSS? Here is my code for a radial gradient: body { color: #575757; font: 14px/21px Arial, Helvetica, sans-serif; background-color: #2f3b4b; background: -moz-radial-gradient(center 45deg, circle closest-corner, #2f3b4b 0%, #3e4f63 100%); background: -webkit-gradient(radial, center center, 10, center center, 900, from(#2f3b4b), to(#3e4f63)); } What would I add to that to have noise on top of it, to give it texture? Ben Rowe There's no current way in css to add 'noise' to a background. An alternative solution would be to create a transparent noise png

How would I make a color Gradient with linear interpolation along with Linked list?

这一生的挚爱 提交于 2019-11-26 21:53:54
问题 I am currently trying to make a rainbow trail that follows your mouse. i used Linkedlist to plot the points of my mouse so the trail follows along. The trail itself looks perfect its only the colors in the trail that don't look right. I'm wanting them to fade into each other. Someone told me to use linear interpolation and after looking into it for awhile it seems like it would work i just don't know how to implement it. this is the code i have so far: import impsoft.bots.ColorBot; import

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

回眸只為那壹抹淺笑 提交于 2019-11-26 21:30:00
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 custom title bar gets called: requestWindowFeature(Window.FEATURE_CUSTOM_TITLE); setContentView(R.layout.foo_layout); getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.custom_title_bar); And this is my custom_title_bar : <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout

Oval Gradient in Android

廉价感情. 提交于 2019-11-26 20:56:57
问题 I know how to setup and display an oval shape. I know how to apply a gradient to this shape. What I cant figure out is how I can get an oval gradient to match the shape. <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval" > <gradient android:startColor="#66FFFFFF" android:endColor="#00FFFFFF" android:gradientRadius="100" android:type="radial" /> </shape> If you can imagine, this gradient has a semi transparent white

SVG Line with Gradient Stroke Won't Display Straight

拥有回忆 提交于 2019-11-26 20:56:46
I'm attempting to replicate an <hr> with SVG. Now, making a straight line with SVG works perfectly, but the second I stroke it with a gradient it will no longer display in a straight line. The following code works, but take note, y1 and y2 must be 1 unit apart. If I set y1 and y2 to 210 for instance, the line will disappear. <defs> <linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="0%"> <stop offset="0%" style="stop-color:rgba(0,0,0,0);stop-opacity:0" /> <stop offset="50%" style="stop-color:rgba(0,0,0,0.75);stop-opacity:1" /> <stop offset="100%" style="stop-color:rgba(0,0,0,0);stop

css text gradient

[亡魂溺海] 提交于 2019-11-26 20:40:54
问题 I've had alittle look around and can't find anything about this. If i have a paragraph of text, is there a way, maybe with CSS3 to gradually change the colour of the text as it goes down to the page? instead of the way that gradient does it, because that only does it on the word not the whole paragraph of text. So i want some text to start off white and then fade into black as it gets to the end of the paragraph. I'm really not sure it can be done... Maybe there is a java script that can do

CGContextDrawAngleGradient?

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-26 19:39:01
问题 Dipping my feet into some more Core Graphics drawing, I'm attempting to recreate a wicked looking metallic knob, and I've landed on what is probably a show-stopping issue. There doesn't seem to be any way to draw angle gradients in Core Graphics. I see there's CGContextDrawRadialGradient() and CGContextDrawLinearGradient() , but there's nothing that I see that would allow me to draw an angle gradient. Does anyone know of a workaround, or a bit of framework hidden away somewhere to accomplish

IE9 border-radius and background gradient bleeding

余生长醉 提交于 2019-11-26 19:25:13
IE9 is apparently able to handle rounded corners by using the CSS3 standard definition of border-radius . What about support for border radius and background gradient? Yes IE9 is to support them both separately, but if you mix the two the gradient bleeds out of the rounded corner. I am also seeing strangeness with shadows showing as a solid black line under a box with rounded corners. Here are the images shown in IE9: How can I work around this problem? Steve Eisner Here's one solution that adds a background gradient, using a data URI to create a semi-transparent image that overlays any

svg multiple color on circle stroke

China☆狼群 提交于 2019-11-26 19:24:57
问题 i want to create a rainbow circle like the picture below: but how can i draw the curved and multiple color stop gradient? here's my current code: <svg width="500" height="500" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <linearGradient id="test"> <stop offset="0%" stop-color="#f00"/> <stop offset="100%" stop-color="#0ff"/> </linearGradient> </defs> <circle cx="50" cy="50" r="40" fill="none" stroke="url(#test)" stroke-width="6"/> </svg> 回答1: This

Applying a Gradient to CAShapeLayer

。_饼干妹妹 提交于 2019-11-26 19:24:09
问题 Does anyone have any experience in applying a Gradient to a CAShapeLayer? CAShapeLayer is a fantastic layer class, but it appears to only support solid fill coloring, whereas I'd like it to have a gradient fill (actually an animatable gradient at that). Everything else to do with CAShapeLayer (shadows, shapes, stroke color, animatable shape path) is fantastic. I've tried placing a CAGradientLayer inside a CAShapeLayer, or indeed setting the CAShapeLayer as the mask of the GradientLayer and