gradient

Sunburst effect with css3 gradient

会有一股神秘感。 提交于 2019-11-30 05:03:13
问题 I have been looking around and trying for a few days, but i just cant seem to get it 100% right... i am trying to achieve the following effect with css3 gradient: the closest i have gotten is DEMO : html { background: linear-gradient(80deg, transparent 50%, #ddd 50%, #ddd), linear-gradient(90deg, transparent 50%, #ddd 50%, #ddd), linear-gradient(82deg, transparent 50%, #eee 50%, #eee), linear-gradient(67deg, transparent 50%, #ddd 50%, #ddd), linear-gradient(52deg, transparent 50%, #eee 50%,

Android's gradient drawables: poor quality of screenshots in Eclipse

Deadly 提交于 2019-11-30 04:56:51
问题 I'm using drawables like the following one for backgrounds with a gradient: <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <gradient android:startColor="#ffffff" android:endColor="#cccccc" android:angle="-90" android:dither="true" /> </shape> This results in a banded gradient on the emulator, and when I take a screenshot of the emulator (using Eclipse), the result is even poorer: Why? And how to solve this

CSS 3 gradients for styling SVG elements

為{幸葍}努か 提交于 2019-11-30 04:24:46
问题 Is it possible to use CSS3 gradients for styling fill property? I know that SVG provides their own gradients. But the ideal solution for me would be: .button{ fill:#960000; fill: -webkit-gradient,linear,left bottom,left top, color-stop(0.45, #37304C),color-stop(0.73, #534D6B)); fill: -moz-linear-gradient(center bottom,#37304C 45%,#534D6B 73%); ... } When I tried to use SVG gradients, I got stucked when I tried to extract style attribute to external stylesheet. It seemed that fill:url(

D3 arc gradient [closed]

孤街醉人 提交于 2019-11-30 04:01:45
I'm trying to create a timer using d3 which has a gradient which will change between 0 and 100%. For example dark orange at 0% and light orange at 100%. I can make the arc transition between dark and light orange but having problems finding anything which allows me to apply a gradient to the arc. An example of what I am trying to achieve can be seen in the image below. Been searching/frying my brain trying to achieve this for a day or so now. SVG does not allow for these kind of gradients. I've done something very similar before, I created a "donut chart" where each wedge is a different color:

IE8 gradient filter not working if a background color exists

倾然丶 夕夏残阳落幕 提交于 2019-11-30 02:06:29
I'm trying to use the following CSS styles. They are working on most browsers, including ie7. However in ie8, the transparent background does not show and instead I get the background color which I would like to leave set as a fallback color. section.rgba{ background-color: #B4B490; background-color: rgba(200, 0, 104, 0.4); filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#99B4B490',EndColorStr='#99B4B490'); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#99B4B490',EndColorStr='#99B4B490')"; zoom: 1 } I would like to be able to get this to work without

My css gradient doesn't stretch, it repeats

浪子不回头ぞ 提交于 2019-11-30 00:09:06
body{ padding:0; margin:0; font:normal 12px/16px Arial, Helvetica, sans-serif; color:#383634; background-image: -webkit-gradient( linear, left top, left bottom, color-stop(0.18, rgb(74,12,107)), color-stop(0.87, rgb(102,153,102)) ); background: -moz-linear-gradient(top, #4a0c6b 0%, #669966 100%); /* FF3.6+ */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#4a0c6b), color-stop(100%,#669966)); /* Chrome,Safari4+ */ background: -webkit-linear-gradient(top, #4a0c6b 0%,#669966 100%); /* Chrome10+,Safari5.1+ */ background: -o-linear-gradient(top, #4a0c6b 0%,#669966 100%);

Imageview set color filter to gradient

依然范特西╮ 提交于 2019-11-29 23:31:39
I have a white image that I'd like to color with a gradient. Instead of generating a bunch of images each colored with a specific gradient, I'd like to do this in code (not xml). To change an image's color, I use imageView.setColorFilter(Color.GREEN); And this works fine. But how can I apply a gradient color instead of a solid color? LinearGradient doesn't help, because setColorFilter can't be applied to Shader objects. EDIT : This is the image I have: This is what I want: And this is what I'm getting: You have to get Bitmap of your ImageView and redraw same Bitmap with Shader public void

How to add a blurred drop shadow to a button?

此生再无相见时 提交于 2019-11-29 23:23:36
I need to add blurred drop shadow to my button: I tried to create background with layer-list xml drawable, but it not looks like blur. <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <!-- Drop Shadow Stack --> <item> <shape> <corners android:radius="45dp" /> <padding android:bottom="2dp" android:left="1dp" android:right="1dp" android:top="1dp" /> <stroke android:width="6dp" android:color="#007879E8" /> </shape> </item> ////// 10 more items <item> <shape> <corners android:radius="45dp" /> <padding android:bottom="2dp" android:left=

Which color gradient is used to color mandelbrot in wikipedia?

爷,独闯天下 提交于 2019-11-29 23:07:36
At Wikipedia's Mandelbrot set page there are really beautiful generated images of the Mandelbrot set. I also just implemented my own Mandelbrot algorithm. Given n is the number of iterations used to calculate each pixel, I color them pretty simple from black to green to white like that (with C++ and Qt 5.0): QColor mapping(Qt::white); if (n <= MAX_ITERATIONS){ double quotient = (double) n / (double) MAX_ITERATIONS; double color = _clamp(0.f, 1.f, quotient); if (quotient > 0.5) { // Close to the mandelbrot set the color changes from green to white mapping.setRgbF(color, 1.f, color); } else { //

Draw transparent gradient with alpha transparency from 0 to 1

心已入冬 提交于 2019-11-29 22:57:29
问题 I have a dynamically generated bitmap in Android that I would like to feather from the top edge such that the border area would be fully transparent at the top and gradually change to fully opaque slightly below. Create an evenly fully-transparent top edge transparentPaint = new Paint(Paint.ANTI_ALIAS_FLAG); transparentPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_OUT)); Shader shader = new LinearGradient(0, 0, 0, 20, Color.TRANSPARENT, Color.TRANSPARENT, Shader.TileMode.CLAMP)