gradient

Crossbrowser css gradient in IE10, IE11

狂风中的少年 提交于 2019-12-06 08:39:34
I did a gradient for dark buttons in all browsers, it appears good, except IE10, IE11 versions. Light stripe on top and bottom. I generate gradient by colorzilla gradient editor. link to buttons HTML <div class="dark-button">div button</div> CSS .dark-button { background: #0874b6; /* Old browsers */ /* IE9 SVG, needs conditional override of 'filter' to 'none' */ background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI

three.js skydome with gradient

坚强是说给别人听的谎言 提交于 2019-12-06 08:09:27
I would like to add a sphere with a 2d gradient as texture to create a skydome. I read that in openGL this is often solved by rendering the skybox without depthtest in an additonal pass. I disabled depthTest on my sphere so everything else is drawn in front of it, it's kinda giving me the disired effect but depending on the camera angle it clips through other objects in my scene. I was looking at several examples which make use of THREE.EffectComposer and a second scene, I may be completely after the wrong thing here but I think that could solve this. The thing is I havent ever touched the

Modern technique of adding gradient to UIView

谁都会走 提交于 2019-12-06 08:06:47
问题 I know of several ways of adding background gradients to UIView. I was wondering what is the most efficient and scalable way of doing so, and why? Here are the techniques I've used: Create subview of UIView and overwrite the drawRect, where I draw the gradient in current context. a. When using the above gradient create it with the bounds of view I want to decorate and insert this background gradient as first subview, i.e. – insertSubview:atIndex: b. After I get the background gradient view

Blend transparent gradient with an image using php GD library

ぃ、小莉子 提交于 2019-12-06 07:56:39
I try to render gradient on top of an image it need to be from full color to transparent, here is my code. I get black image and if I put start more then 0 I got white gradient but no image. the output image is 338x100 px but the input image need to be aligned to right if the image is narrower. function hex2rgb($hex) { $rgb[0] = hexdec(substr($hex, 0, 2)); $rgb[1] = hexdec(substr($hex, 2, 2)); $rgb[2] = hexdec(substr($hex, 4, 2)); return $rgb; } function int2rgb($color) { $result[] = ($color >> 16) & 0xFF; $result[] = ($color >> 8) & 0xFF; $result[] = $color & 0xFF; return $result; } if (isset

How to implement a conical/cone/circular gradient in WPF

ε祈祈猫儿з 提交于 2019-12-06 07:18:24
问题 I would like to recreate a conical/circular gradient in WPF. I've looked into inheriting System.Windows.Media.GradientBrush - which can be inherited from - but uses a lot of internal plumbing to get the job done (inherited from System.Windows.Media.Brush) Any ideas on how to achieve this would be appreciated (preferrably without resorting to bitmaps) Cheers. Dan This question was asked some time back in July (Circular Gradient and WPF) but I didn't want to resurrect an old question. 回答1: You

Generating Color Gradients

倖福魔咒の 提交于 2019-12-06 05:30:24
I had an idea to programmatically generate matching color schemes however I need to be able to generate a linear gradient given a set of two colors (Hex or RGB values). Can anyone provide me the (pseudo-)code or point me in the right direction to accomplish this task? EDIT : I forgot to mention, but I also need to specify (or know) the number of steps the gradient takes from color A to color B. Okay, so you know the steps, start color and end color. Assuming you have RGB values for each color: red_diff = end_red - start_red green_diff = end_green - start_green blue_diff = end_blue - start_blue

Java- Creating a discrete rainbow colour array

こ雲淡風輕ζ 提交于 2019-12-06 04:13:16
问题 Hard to describe what I'm trying to do. I basically want to create a discrete rainbow gradient so that for any line of i number of JButtons, the colour gradient across them will look rainbow. I have done the following but it only really creates a red gradient followed by green gradient followed by blue gradient: Color[] c = new Color[i]; for(int n = 0; n < i; n++) { if(n < i/3) { c[n] = new Color(255, 255/(n+1), 255/(n+1)); } else if(n < 2*i/3) { c[n] = new Color(255/(n-(i/3)), 255, 255/(n-(i

Gradient color for each category to generate a heatmap table using ggplot in R

混江龙づ霸主 提交于 2019-12-06 03:51:24
I am trying to generate a heatmap table using ggplot in R . My data looks this: dt <- cbind(rbinom(1:10,100,0.9), rbinom(1:10,100,0.5), rbinom(1:10,100,0.2), rbinom(1:10,100,0.05) colnames(dt) <- c("A","B","C","D") I want to use different gradient colors for each category to emphasize the importance of each value. Since the range of values is large, the smaller number will be colored almost same. That's why, I want to use different colors. My code is here: library(dplyr) library(ggplot2) library(reshape2) library(scales) dt <- cbind(rbinom(1:10,100,0.9), rbinom(1:10,100,0.5), rbinom(1:10,100,0

Estimate the gradient of an undefined surface

余生长醉 提交于 2019-12-06 03:37:22
问题 I want to estimate the gradient (slope and aspect) of an undefined surface (i.e., the function is unknown). To test my methods, here is the test data: require(raster); require(rasterVis) set.seed(123) x <- runif(100, min = 0, max = 1) y <- runif(100, min = 0, max = 1) e <- 0.5 * rnorm(100) test <- expand.grid(sort(x),sort(y)) names(test)<-c('X','Y') z1 <- (5 * test$X^3 + sin(3*pi*test$Y)) realy <- matrix(z1, 100, 100, byrow = F) # And a few plots for demonstration # persp(sort(x), sort(y),

Gradient Background that doesn't scale

巧了我就是萌 提交于 2019-12-06 00:33:19
I need to create a gradient that is 230dp high (i.e., not the whole screen), with the rest of the screen a solid color. I can't figure out how to do this -- everything I try ends up with the gradient expanding to fill the whole screen. My current XML looks like this: <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android" > <item android:top="230dp"> <shape android:shape="rectangle" > <color android:color="#333333" /> </shape> </item> <item> <shape android:shape="rectangle" > <gradient android:angle="270" android:endColor="#333333" android