Search Results

Search found 332 results on 14 pages for 'gradient'.

Page 3/14 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • CSS gradient not rendering in Windows Phone 8 WebBrowser Control

    - by SRSHawk
    I am facing an issue where, the CSS3 background is not rendered in WebBrowser control in Windows Phone 8. But same HTML when opened in WebBrowser in Windows Phone 8, it renders the gradient The HTML I am using is: <html> <head> <meta name="viewport" content="width=320, user-scalable=no, minimum-scale=1, maximum-scale=1"/> </head> <body style="margin:0px;overflow:hidden;"> <div id="im_c" style="height:48px;width:100%25; background: -ms-linear-gradient( bottom, #432100 30%, #00AAAA 70%);"> <div style="margin:0 auto;width:320px;"> Test </div> </div> <style> body {margin:0px} </style> </body> In Windows Phone 8, I use the HTML as below: WebBroswer WebView = new WebBrowser(); WebView.Height = 100; WebView.Width = 400; WebView.NavigateToString(@"<html><head><meta name=""viewport"" content=""width=320, user-scalable=no, minimum-scale=1, maximum-scale=1""/></head><body style=""margin:0px;overflow:hidden;""> <div id=""im_c"" style=""height:48px;width:100%25; background: -ms-linear-gradient( bottom, #432100 30%, #00AAAA 70%);""> <div style=""margin:0 auto;width:320px;"">Test</div></div> <style> body {margin:0px} </style> </body></html>"); In this case, the CSS gradient is not visible. Am I missing something?

    Read the article

  • How would I go about setting a CSS gradient background in JavaScript?

    - by Dan
    The CSS gradient is described here, but I have no idea how to select for these properties in JavaScript. I would rather not use jQuery for this if at all possible. EDIT: Just doing the following doesn't seem to work... document.getElementById("selected-tab").style.background = "#860432"; document.getElementById("selected-tab").style.background = "-moz-linear-gradient(#b8042f, #860432)"; document.getElementById("selected-tab").style.background = "-o-linear-gradient(#b8042f, #860432)"; document.getElementById("selected-tab").style.background = "-webkit-gradient(linear, 0% 0%, 0% 100%, from(#b8042f), to(#860432))"; document.getElementById("selected-tab").style.background = "-webkit-linear-gradient(#b8042f, #860432)";

    Read the article

  • How to interpolate hue values in HSV colour space?

    - by nick
    Hi, I'm trying to interpolate between two colours in HSV colour space to produce a smooth colour gradient. I'm using a linear interpolation, eg: h = (1 - p) * h1 + p * h2 s = (1 - p) * s1 + p * s2 v = (1 - p) * v1 + p * v2 (where p is the percentage, and h1, h2, s1, s2, v1, v2 are the hue, saturation and value components of the two colours) This produces a good result for s and v but not for h. As the hue component is an angle, the calculation needs to work out the shortest distance between h1 and h2 and then do the interpolation in the right direction (either clockwise or anti-clockwise). What formula or algorithm should I use? EDIT: By following Jack's suggestions I modified my JavaScript gradient function and it works well. For anyone interested, here's what I ended up with: // create gradient from yellow to red to black with 100 steps var gradient = hsbGradient(100, [{h:0.14, s:0.5, b:1}, {h:0, s:1, b:1}, {h:0, s:1, b:0}]); function hsbGradient(steps, colours) { var parts = colours.length - 1; var gradient = new Array(steps); var gradientIndex = 0; var partSteps = Math.floor(steps / parts); var remainder = steps - (partSteps * parts); for (var col = 0; col < parts; col++) { // get colours var c1 = colours[col], c2 = colours[col + 1]; // determine clockwise and counter-clockwise distance between hues var distCCW = (c1.h >= c2.h) ? c1.h - c2.h : 1 + c1.h - c2.h; distCW = (c1.h >= c2.h) ? 1 + c2.h - c1.h : c2.h - c1.h; // ensure we get the right number of steps by adding remainder to final part if (col == parts - 1) partSteps += remainder; // make gradient for this part for (var step = 0; step < partSteps; step ++) { var p = step / partSteps; // interpolate h var h = (distCW <= distCCW) ? c1.h + (distCW * p) : c1.h - (distCCW * p); if (h < 0) h = 1 + h; if (h > 1) h = h - 1; // interpolate s, b var s = (1 - p) * c1.s + p * c2.s; var b = (1 - p) * c1.b + p * c2.b; // add to gradient array gradient[gradientIndex] = {h:h, s:s, b:b}; gradientIndex ++; } } return gradient; }

    Read the article

  • Is it possible to dither a gradient drawable?

    - by Seu
    I'm using the following drawable: <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" > <gradient android:startColor="@color/content_background_gradient_start" android:endColor="@color/content_background_gradient_end" android:angle="270" /> </shape> The problem is that I get severe banding on hdpi devices (like the Nexus One and Droid) since the gradient goes from the top of the screen to the very bottom. According to http://idunnolol.com/android/drawables.html#shape_gradient there isn't a "dither" attribute for a gradient. Is there anything I can do to smooth the gradient?

    Read the article

  • [css only gradient background] problems with ff < 3.6

    - by Luca
    hi! :) anyone know if is possible to reproduce this effect background-image: -moz-linear-gradient(top, #666666, #000000); background-image: -webkit-gradient(linear,left bottom,left top,color-stop(0, #000000),color-stop(1, #666666)); also on ff < 3.6? im tryin' to generate a gradient background without images! thanks a lot in advance for any advice.

    Read the article

  • Adding multiple gradients to object in Adobe Illustrator

    - by Vass
    Hi, I have an object which is a path (a nose to be specific). Now I want both a linear gradient and a radial gradient to be added to the object. So these must be separate gradient objects I guess, and I can't find a way to add multiple separate gradients to a complete path so do I duplicate the object and then apply a new gradient to each object? And what would the layer transparency features look like? Would the 'normal' overlay of the layers work? I am afraid of multiple shadows creating double dark regions, but maybe that is as its supposed to be if you think in terms of classical art and draw shadows in terms of each light obstruction.

    Read the article

  • How to create a vertical gradient in flex

    - by Zeeshan Rang
    How to create vertical gradient in flex. What i currently have is a horizontal color gradient. And its working fine. But I am unable to figure out how should I make it vertical (which ofcourse is the requirement) I use styleName = "chatWindowLeftGradient" <mx:VBox id="chatTabBarVBox" height="100%" styleName="chatWindowLeftGradient"> </mx:VBox> And the style sheet looks like this: <mx:Style> .chatWindowLeftGradient{ backgroundImage: ClassReference("custom.GradientBackground"); backgroundSize: "100%"; fillColors: #6db263, #a4d9a1; fillAlphas: 1, 1; } </mx:Style> This give a gradient from top to bottom. How i can make from left to right?? Regards Zeeshan

    Read the article

  • Issue when I'm trying to draw gradient in swift

    - by bagusflyer
    I got an error when I was trying to draw gradient in Swift code: GradientView.swift:31:40: Could not find an overload for '__conversion' that accepts the supplied arguments Here is my code: let context : CGContextRef = UIGraphicsGetCurrentContext() let locations :CGFloat[] = [ 0.0, 0.25, 0.5, 0.75 ] let colors = [UIColor.redColor().CGColor,UIColor.greenColor().CGColor,UIColor.blueColor().CGColor, UIColor.yellowColor().CGColor] let colorspace : CGColorSpaceRef = CGColorSpaceCreateDeviceRGB() let gradient : CGGradientRef = CGGradientCreateWithColors(colorspace, colors, locations) //CGGradientCreateWithColors(colorspace,colors,locations) let startPoint : CGPoint = CGPointMake(0, 0) let endPoint : CGPoint = CGPointMake(500,500) CGContextDrawLinearGradient(context, gradient,startPoint, endPoint, 0); The problem is the CGGradientCreateWithColors takes CFArray not a normal Swift Array. I have no idea how to convert CFArray to Array and can't find anything in Apple's document. Any idea? Thanks

    Read the article

  • CSS Square Div with an Inward Oval Shape

    - by user2813099
    I am trying to create a div in css with an inward oval shape to it like this. At the moment, I have a shape that is outward instead of inward (JS Fiddle Link). .shape { float: left; width: 100px; height: 50px; border: none; background: #CC0000; border-radius: 0 90px 0 0; -moz-border-radius: 0 90px 0 0; -webkit-border-radius: 0 90px 0 0; background-image: -webkit-gradient( linear, left top, right bottom, color-stop(0, #520C0C), color-stop(1, #CC0000) ); background-image: -o-linear-gradient(right bottom, #520C0C 0%, #CC0000 100%); background-image: -moz-linear-gradient(right bottom, #520C0C 0%, #CC0000 100%); background-image: -webkit-linear-gradient(right bottom, #520C0C 0%, #CC0000 100%); background-image: -ms-linear-gradient(right bottom, #520C0C 0%, #CC0000 100%); background-image: linear-gradient(to right bottom, #520C0C 0%, #CC0000 100%); } Any ideas on how to go about this?

    Read the article

  • How do I create a gradient button on an iPhone?

    - by jkp
    How can I create a button that looks like the one found in the screenshot below on an iPhone with the 3.0 SDK? It's a button that shows when connecting to a host iTunes library from the iTunes remote. Is it a case of writing a custom control or is this a stock style?

    Read the article

  • -moz-linear-gradient

    - by bah
    Hi, Could someone explain to me what this portion of code means? repeat scroll 0 0 #F6F6F6; I have googled a lot and only found syntax to this part -moz-linear-gradient(center top , #FFFFFF, #EFEFEF) My code: background: -moz-linear-gradient(center top , #FFFFFF, #EFEFEF) repeat scroll 0 0 #F6F6F6; Thanks!

    Read the article

  • Body CSS Gradient that Stops and Continues as Solid Color

    - by Alfo
    Something similar to this question has been asked here - HTML/CSS Gradient that stops at a perticular height and continues further with a solid color, but as far as I can see this doesn't work when using it on the body for a background color - which is what I want to achieve. Specifically, I would like it to be light blue at the top of the page, gradient into dark blue 200px further down, and then continue in dark blue for ever. Thanks to anybody who can help, Alfo.

    Read the article

  • Jquery gradient behavior applies to all but first URL

    - by Dustin
    I've got a page that shows my photography portfolio. I'm trying to do a jquery gradient on the text, and it's working on all but the first link. Here's the html: <h1><a href="portfolio/engagements"><span></span>engagements</a> | </h1><br> <h1><a href="portfolio/weddings"><span></span>weddings</a> | </h1> <br> <h1><a href="portfolio/bridals"><span></span>bridals</a> | </h1> <br> <h1><a href="portfolio/families"><span></span>families</a> | </h1> <br> <h1><a href="portfolio/seniors"><span></span>seniors</a> </h1> <br> And here's the jquery call: $(".jquery h1").prepend("<span></span>"); And here's the css for it: .gradient4 span { background: url(images/gradient-dark.png) repeat-x; position: absolute; bottom: -0.1em; display: inline; width: 100%; height: 29px; } The problem I'm having is that all urls but the first link (currently 'engagements'), have the gradient effect. Any ideas why the first link isn't working?

    Read the article

  • CSS repeat pattern with linear gradient

    - by luca
    I'm on my first approach with photoshop patterns.I'm buildin a webpage where I want to use my pattern to give a nice effect to my webpage background. The pattern I found is 120x120 px If I was done here I should use this css: background-imag:url(mypattern.jpg); background-repeat:repeat; But Im not done.Id like to *add to my page's background a linear gradient(dir=top/down col=light-blue/green) with the pattern fill layer on top of it, with blending mode=darken *. This is the final effect: I come to the point. QUESTION: Combining linear vertical-gradient effect and my 120x120 pattern is it possible to find a pattern that I could use to repeat itself endlessly both vertical and horizontal??which is a common solution in this case? Hope It's clear thanks Luca

    Read the article

  • How to gradient fill a button's background?

    - by Samuh
    I have to create a colored button with gradient fill(starting from the middle of the button along Y axis). If I set the background property of the button to the color I want, I lose the rounded look and feel of a button and also the gradient fill(It looks like a TextView with a background). Also, I want this color to change when the user depresses the button. Can i specify this via selector XMLs(Color State Lists)? Any tutorials or links that can help me here is appreciated. Thanks.

    Read the article

  • Thoughts about alternatives to barplot-with-error-bars

    - by gd047
    I was thinking of an alternative to the barplot-with-error-bars plot. To get an idea by example, I roughly 'sketched' what I mean using the following code library(plotrix) plot(0:12,type="n",axes=FALSE) gradient.rect(1,0,3,8,col=smoothColors("red",38,"red"),border=NA,gradient="y") gradient.rect(4,0,6,6,col=smoothColors("blue",38,"blue"),border=NA,gradient="y") lines(c(2,2),c(5.5,10.5)) lines(c(2-.5,2+.5),c(10.5,10.5)) lines(c(2-.5,2+.5),c(5.5,5.5)) lines(c(5,5),c(4.5,7.5)) lines(c(5-.5,5+.5),c(7.5,7.5)) lines(c(5-.5,5+.5),c(4.5,4.5)) gradient.rect(7,8,9,10.5,col=smoothColors("red",100,"white"),border=NA,gradient="y") gradient.rect(7,5.5,9,8,col=smoothColors("white",100,"red"),border=NA,gradient="y") lines(c(7,9),c(8,8),lwd=3) gradient.rect(10,6,12,7.5,col=smoothColors("blue",100,"white"),border=NA,gradient="y") gradient.rect(10,4.5,12,6,col=smoothColors("white",100,"blue"),border=NA,gradient="y") lines(c(10,12),c(6,6),lwd=3) The idea was to use bars like the ones in the second pair, instead of those in the first. However, there is something that I would like to change in the colors. Instead of a linear gradient fill, I would like to adjust the color intensity in accordance with the values of the pdf of the mean estimator. Do you think it is possible? A slightly different idea (where gradient fill isn't an issue) was to use one (or 2 back-to-back) bell curve(s) filled with (solid) color, instead of a rectangle. See for example the shape that corresponds to the letter F here. In that case the bell-curve(s) should (ideally) be drawn using something like plot(x, dnorm(x, mean = my.mean, sd = std.error.of.the.mean)) I have no idea though, of a way to draw rotated (and filled with color) bell curves. Of course, all of the above may be freely judged as midnight springtime dreams :-)

    Read the article

  • Color picker does not give gradient appearance

    - by ykaratoprak
    i added below codes. But it generates to me 16 color. but i need 16 color between "red" and "khaki". i don't need gradient flow. My colors look like gradient flow. My colors must not closer to each other. Because i will use this codes return values in chart columns. they are too near each other. static class Program { [STAThread] static void Main() { Form form = new Form(); Color start = Color.Red, end = Color.Khaki; for (int i = 0; i < 16; i++) { int r = Interpolate(start.R, end.R, 15, i), g = Interpolate(start.G, end.G, 15, i), b = Interpolate(start.B, end.B, 15, i); Button button = new Button(); button.Dock = DockStyle.Top; button.BackColor = Color.FromArgb(r, g, b); form.Controls.Add(button); button.BringToFront(); } Application.Run(form); } static int Interpolate(int start, int end, int steps, int count) { float s = start, e = end, final = s + (((e - s) / steps) * count); return (int)final; } }

    Read the article

  • Gradient fills only half the cell

    - by Gopal
    Hi, How do I get the IE gradient function here in this code sample to completely fill the table cell? With the code given below, I could only get it to cover the upper half of the cell. <HTML> <HEAD> <style> <!--table .cl1 { font-family:Comic Sans MS; font-size:11.0pt; color:#800000; border-left:1.5pt solid #000000; border-top:1.5pt solid #000000; border-right:1.5pt solid #000000; border-bottom:1.5pt solid #000000; background-color:#ffffff; filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=1, StartColorStr='#ffffff', EndColorStr='#99cc00') progid:DXImageTransform.Microsoft.dropshadow(Color='#660000', Positive='true', OffX=0, OffY=0); } --> </style></HEAD> <BODY> <table x:str cellspacing=0 style='table-layout:fixed; border-left:1.0pt solid; border-top:1.0pt solid; border-right:1.0pt solid; border-bottom:1.0pt solid; border-left-color:#c0c0c0; border-top-color:#c0c0c0; border-right-color:#c0c0c0; border-bottom-color:#c0c0c0; '> <col style='width:67pt;'> <tr style='height:28.00pt'> <td class=cl1 style='width:67pt;'>Cell Text</td> </tr> </BODY> </HTML>

    Read the article

  • Animating gradient displays line artifacts in ActionScript

    - by TheDarkIn1978
    i've programatically created a simple gradient (blue to red) sprite rect using my own basic class called GradientRect, but moving or animation the sprite exhibits line artifacts. when the sprite is rotating, it kind of resembles bad reception of an old television set. i'm almost certain the cause is because each line slice of the gradient is vector so there are gaps between the lines - this is visible when the sprite is zoomed in. var colorPickerRect:GradientRect = new GradientRect(200, 200, 0x0000FF, 0xFF0000); addChild(colorPickerRect); colorPickerRect.cacheAsBitmap = true; colorPickerRect.x = colorPickerRect.y = 100; colorPickerRect.addEventListener(Event.ENTER_FRAME, rotate); function rotate(evt:Event):void { evt.target.rotation += 1; } ________________________ //CLASS PACKAGE package { import flash.display.CapsStyle; import flash.display.GradientType; import flash.display.LineScaleMode; import flash.display.Sprite; import flash.geom.Matrix; public class GradientRect extends Sprite { public function GradientRect(gradientRectWidth:Number, gradientRectHeight:Number, ...leftToRightColors) { init(gradientRectWidth, gradientRectHeight, leftToRightColors); } private function init(gradientRectWidth:Number, gradientRectHeight:Number, leftToRightColors:Array):void { var leftToRightAlphas:Array = new Array(); var leftToRightRatios:Array = new Array(); var leftToRightPartition:Number = 255 / (leftToRightColors.length - 1); var pixelColor:Number; var i:int; //Push arrays for (i = 0; i < leftToRightColors.length; i++) { leftToRightAlphas.push(1); leftToRightRatios.push(i * leftToRightPartition); } //Graphics matrix and lineStyle var leftToRightColorsMatrix:Matrix = new Matrix(); leftToRightColorsMatrix.createGradientBox(gradientRectWidth, 1); graphics.lineStyle(1, 0, 1, false, LineScaleMode.NONE, CapsStyle.NONE); for (i = 0; i < gradientRectWidth; i++) { graphics.lineGradientStyle(GradientType.LINEAR, leftToRightColors, leftToRightAlphas, leftToRightRatios, leftToRightColorsMatrix); graphics.moveTo(i, 0); graphics.lineTo(i, gradientRectHeight); } } } } how can i solve this problem?

    Read the article

  • Java2d: Set gradient for a lines

    - by Algorist
    Hi, I am having multiple points in a plane and some hundreds of lines pass through those points. Some points can have more lines passing through them than other points. I want to show some kind of more gradient or brightness associated with lines crowded together. Is this possible to do in java2d. Please refer to this : http://ft.ornl.gov/doku/_media/ft/projects/paraxis.jpg Thank you.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >