Menu
  • HOME
  • TAGS

Fill Panel with gradient in three colors

c#,winforms,colors,color-picker,lineargradientbrush

Here is an example for using a multicolor LinearGradientBrush in the Paint event: LinearGradientBrush linearGradientBrush = new LinearGradientBrush(panel4.ClientRectangle, Color.Red, Color.Yellow, 45); ColorBlend cblend = new ColorBlend(3); cblend.Colors = new Color[3] { Color.Red, Color.Yellow, Color.Green }; cblend.Positions = new float[3] { 0f, 0.5f, 1f }; linearGradientBrush.InterpolationColors = cblend; e.Graphics.FillRectangle(linearGradientBrush, panel4.ClientRectangle); You...

some text of my cells changes color when I scroll my tableview

ios,uitableview,colors,cell,changes

You need an else in the code you quoted. What colour do you want it to be when the dateIsGreaterThanDate test is false?

Android: How to change the color of the dateselector in Datepicker widget?

android,colors,datepicker,calendar,selector

Okay I think I got it. I tried desperately to find an attribute in MyDatePickerStyle. The solution came to my mind when I rethought the whole inheritance hierarchy. I just had to add the colorAccent to the MyDatePickerDialogTheme. <style name="MyDatePickerDialogTheme" parent="Theme.AppCompat.Light.Dialog"> <!-- this is new --> <item name="colorAccent">@color/accent</item> <item name="android:datePickerStyle">@style/MyDatePickerStyle</item>...

Matlab - Using symbols in gscatter

colors,symbols,symbol,marker,scatter

Luc It seems that you have some errors in your code. The syntax for gscatter should include at least 3 parameters : x, y and group. It seems that group is missing. Furthermore the definition of color and sym may be wrong. Try col = 'kkkkkkkk'; instead of lincol =...

Problems with changing colors in chart winform

c#,winforms,charts,colors,series

The colors are assigned automatically according to a palette, unless a color has been set explicitly. So the next series down gets the freed up color. To avoid this, you need to explicitly set the colors of all series. See http://msdn.microsoft.com/en-us/library/system.windows.forms.datavisualization.charting.series.palette(v=vs.110).aspx...

gstreamer wrong colors when converting h264 to raw RGB

linux,colors,rgb,gstreamer,gst

As noted in the comments below: the "-q" option is needed to prevent gst-launch from spitting out debug info to the stdout pipe. Ok, funny story, looks like when you specify video size in ffplay you use HEIGHTxWIDTH, and in GStreamer you use WIDTHxHEIGHT. This command works fine: gst-launch-1.0 -q...

How to interpolate four colors?

java,android,colors

Assuming that you have already determined the current "volume" of the user in a float value where 0 is completely silent, and 1 is maximum, then I would do something like this: float v = userVolume(); if (v < SOFT_CUTOFF) color = interpolateColor(SILENT_COLOR, SOFT_COLOR, v/SOFT_CUTOFF); else if (v < NORMAL_CUTOFF)...

Changing the colour for a specific hyperlink in html5/CSS

css,html5,colors

Assign a class or an id to your tag and than crate a selector for it in your css. You can also do achieve that with inline style but it is not a best practice: class: HTML: <a class="my-class">Link</a> <a id="my-id">Link</a> <a style="color:#000;">Link</a> CSS: .my-class{ color:#000; } #my-id{ color:#000; }...

How to apply flat shading to RGB colors?

graphics,colors,3d,rgb

The color RGB vector is multiplied by the shade coefficient (the cosine value as you initially assumed) The logarithmic scaling is done by the target imaging device and human eyes If your colors get too dark then the probable cause is: the cosine or angle value get truncated to integer...

how to color specific words in a uialertview or UIAlertController ? (SWIFT)

ios,colors,uialertview

You could make use of NSAttributedString and UIAlertController: let strings = [["text" : "My String red\n", "color" : UIColor.redColor()], ["text" : "My string green", "color" : UIColor.greenColor()]]; var attributedString = NSMutableAttributedString() for configDict in strings { if let color = configDict["color"] as? UIColor, text = configDict["text"] as? String { attributedString.appendAttributedString(NSAttributedString(string:...

White text in sublime text

colors,sublimetext2,sublimetext

This happens when sublimetext doesn't know which syntax highlighting to choose. First of all sublime guesses the syntax from the file extension. E.g. if you have a file named my_file_name.php sublime assumes that the php syntax highlighting is the best. In your picture the file name is script_connection without any...

Css fill div height with color [closed]

html,css,html5,css3,colors

Perhaps the following may get you started in the right direction. In this example, set the height to 100% for the html and body tags, and then 100% for the left hand panel/div. I floated the two div's to get the two columns, but there are other ways of creating...

Output for getRGB()

java,colors

You're doing it the wrong way. Instead of deducing the type of the piece from its color, you should deduce its color from its type. Define an enum for the piece type: public enum PieceType { BLACK, RED } Then define your Piece class, which should have a color based...

What is the word for colorizing grayscale bitmap

algorithm,graphics,colors,bitmap

Color Interpolation is appropriate term for this problem. In the simplest case you can make linear interpolation for every R,G,B color. If more fine and smooth gradient is needed, consider interpolation in another color spaces...

Translating Minecraft Color Codes into HTML

javascript,jquery,html,colors,minecraft

Here's a way to do it. A brief explanation of how this works: It looks for all codes in the string with a regex that matches them (see the very first line in the parseStyle function) It pushes the indexes of where those codes are in the string into an...

Color bar graph according to grouping variable

r,colors,boxplot

One approach is to use a named vector to define the colors, which you can index with the levels of the factor (this assumes the grouping column is a factor; otherwise it must be a character vector, in which case it could be used as the index argument directly): df...

r stacked bargraph with colors representing values

r,colors,bar-chart,stacked-chart

Based on the comments below: library(ggplot2) ggplot(d, aes(x = Day, y = Length)) + geom_bar(aes(fill = Amount, order = Location), stat = "identity") ...

LibGDX shaperenderer wrong color

colors,libgdx,shape-rendering

@Xoppa is right the r, g, b and a in shapeRenderer.setColor(r, g, b, a); are always supposed to be between 0 and 1. In your case it would be shapeRenderer.setColor(67/255f, 34/255f, 167/255f, 0.5f); And don't forget to add the f behind the numbers because we need float not double....

Change Font Color on Overflow

css,text,fonts,colors,overflow

Just add position: absolute; to the .val CSS. Also remove the height:100% from both the .val and .current CSS.

How can i Create Color simulation with JFrame, JLabel, using setForeground?

java,swing,animation,colors,jframe

I tried Wait, but it just froze the program and then it yielded the color, without transition It is unclear if you are calling this code on the EDT, but from the description sounds to be the case - sleeping (or performing a long running task) on the EDT...

Matlab plot3 movie where the colour of each point varies depending on arbitrary vector

matlab,plot,colors,3d,movie

A possible solution could be: to define a matrix of colour indeces: since you need 9 colours it should be a (9 x 3) matrix to use the value stored in the 5th column of your data to select the color in the color matrix (i. e. to select the...

Is it possible to have different colored graphs in a single series in HighCharts?

javascript,colors,highcharts

Try out the following plotOptions: { column: { colorByPoint: true } }, colors: [ '#7cb5ec', '#434348', '#90ed7d', '#f7a35c', '#8085e9', '#f15c80', '#e4d354', '#2b908f', '#f45b5b', '#91e8e1' ], Fiddle link :) Update 1: Dynamic series fiddle:) Update 2: Use the following code to have specific color for specific bar chart.series[0].addPoint({y: Math.random() * 100,...

Java replacing the background of an image

java,image,colors,background,pixel

What you have is almost correct. Simply read in your second picture like you have your first picture here: Picture background = new Picture("background.png"); background.explore(); Then in your inner loop simply do: targetPixel = pictureObj2.getPixel(x,y); pixelColor = targetPixel.getColor(); if(!pixelColor.equals(WHITE)) //test if you have a blank pixel background.getPixel(x,y).setColor(pixelColor); //if not its...

How can I make this timer() work as I want?

java,swing,timer,colors,jframe

(I really don't know what your "codes" are doing, as R-RB doesn't seem to make sense, how do you display R, G and B?) Okay, you need to start by generating some kind of sequence that you want displayed. This will allow the Timer to act as a pseudo loop...

Colorbar - axis ticks in Matlab

matlab,plot,colors,matlab-figure

Ratbert pretty much answered the first question. However, for the sake of completeness, simply do this and replace your current caxis call: caxis([0.5 12.5]); To answer the second question, yes you can. If you notice in your code, you produced a colour map of 12 components from the jet theme....

android studio cannot resolve symbol “ff”

android,colors

It should be 0xff and not 0*ff cred=(clr & 0xff)>>16; 0*ff is multiplying 0 with unknown symbol ff (since you don't have any variable named ff in scope) While above code will compile and resolve your error, it is not correct code for reading red color value from bitmap pixel....

How to change background of TextView From EditText Text Change?

android,colors,background,android-edittext,textview

My solution is a little modification of @GuiihE codes. Try this solution,it would work out as per your requirements: TextWatcher textWatcher = new TextWatcher() { @Override public void onTextChanged(CharSequence s, int start, int before, int count) {} @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) {} @Override...

Change All ToolStripMenuItem ForeColor

c#,visual-studio,colors,items,menustrip

Pertinent to your rather broad question, the sort of generic answer is: ToolStripMenuItem controls (e.g. _mnuItem ) have ForeColor property, which can be set programmatically in C# code-behind, like: _mnuItem .ForeColor = Color.Black; Hope this may help....

android lolipop primary color doesnt change

android,colors,android-actionbar

You need to make sure that your manifest is using that theme. For example, this sample project applies custom tints to the Theme.Material action bar. It has a theme similar to yours, though I pull my colors out into color resources: <?xml version="1.0" encoding="utf-8"?> <resources> <style name="AppTheme" parent="android:Theme.Material"> <item name="android:colorPrimary">@color/primary</item>...

Set Colors of zoomable treemap conditionally

javascript,json,d3.js,colors

Your question is a little vague (next time include some code!), but in general, say you have data like this: var data = [{ conditionA: true, conditionB: false }, { conditionA: false, conditionB: true }, { conditionA: false, conditionB: false }]; then it's as simple as: svg.selectAll('.SomeCircles') .data(data) .enter() .append('circle')...

crop image, convert to black and white and sharpen it

r,image,image-processing,colors,raster

To actually see grays you need to provide these colors. library(raster) r1 <- brick(system.file("external/rlogo.grd", package="raster")) x <- crop(r1, extent(0,50,0,50)) flat <- sum(x * c(0.2989, 0.5870, 0.1140)) plot(flat, col=gray(seq(0,1,0.1))) You can use the reclassify function to get values that are either 0 or 255 but in this case it would seem...

JTable with different color value

java,swing,colors,jtable

It can be observed that in the second row appear only 3 values, which I want to be colored. You will have to create a custom TableCellRenderer that colors each cell corresponding to the item in that cell. But... I would like to fix the propblem with the indentation...

R-Project Barplot Colors

r,colors,bar-chart

Passing in a vector instead of a table should do the trick: barplot(x[1, ], main="X", ylab="Percent", cex.names=0.75, col=color) Or barplot(x["Percentage", ], main="X",ylab="Percent",cex.names=0.75, col=color) ...

I used a for loop to draw different curves. But how can I change every line to a different color?

javascript,colors,html5-canvas,curves

you can use a function like this: function getRandomInt(min, max) { return Math.floor(Math.random() * (max - min + 1)) + min; } to retrieve a random number between 0 and 255 for each value of R,G and B (red green and blue). So I'd write your code as red =...

Dynamic text color changing

javascript,jquery,colors,jquery-animate

Because you are not assigning a reference, you keep calling it complete: dynamicColor() needs to be complete: dynamicColor or complete: function() { dynamicColor(); } Next issue is you have complete inside of the properties you are animating. It is not going to be called. function dynamicColor() { $(".class").animate({height: "100px"}, 1000)...

Messed up color scheme in ReSharper C++

c++,visual-studio-2013,colors,resharper,resharper-c++

The colour scheme is not really messed up, Resharper has just added a few more colours, this is probably due to the Code Inspections (for C# anyway, I assume it is similar for C++). To disable this, go to: Resharper->Options...->Code Inspection->Settings and uncheck the 'Color identifiers' EDIT: The above was...

Converting a Number Matrix to a Color Matrix in R

r,matrix,colors

Here's what I would do: d<-read.table(text=" 0 1 0 3 3 2 1 4 4 1 0 2 3 3 0 1") cols <- c( '0' = "#FFFFFF", '1' = "#99FF66", '2' = "#66FF33", '3' = "#33CC00", '4' = "#009900" ) # the names aren't necessary here. image(1:nrow(d), 1:ncol(d), as.matrix(d),...

“Constant Expression required” Exception thrown when using Optional Parameters [duplicate]

.net,vb.net,exception,colors,optional-parameters

You could do something like this: Public Sub SolidFill(Optional SolidColor As Color = Nothing) If SolidColor = Nothing Then SolidColor = Color.Black End Sub ...

C# (WinForms) - Find Colour of Cursor

c#,winforms,colors,cursor,screen

As far as I am currently aware, the only way that you'd be able to do this is if you were to create a custom driver that can act as an intermediary between the user. I haven't read much of it, but you might want to look into this project...

Why won't the average color yield to a result other than black?

ios,swift,colors

The RGBA components of UIColor are floating point numbers in the range 0.0 ... 1.0, so this averageColor.getRed(&red, green: &green, blue: &blue, alpha: &alpha) var bgDelta = ((red * 0.299) + (green * 0.587) + (blue * 0.114)) also computes a value bgDelta in that range. Therefore the treshold must...

Background color change of found text in notepad++

colors,notepad++,highlighting

Settings > Style Configurator Under Language find "Search result" (on my notepad++ this is the one at the bottom) Under style change as wished...

Convert a 0-1 value to a hex colour?

javascript,colors,hex,rgb,rgba

The best would be to work in another color space than the RGB one. For example HSL. Example: var stones = [ // Your Data {v:0, hex:'#9aafff'}, {v:.165, hex:'#cad8ff'}, {v:.33, hex:'#f7f7ff'}, {v:.495, hex:'#fcffd4'}, {v:.66, hex:'#fff3a1'}, {v:.825, hex:'#ffa350'}, {v:1, hex:'#fb6252'}, ] stones.forEach(function(s){ s.rgb = hexToRgb(s.hex); s.hsl = rgbToHsl.apply(0, s.rgb); }); function...

Xcode + PDF images colors look darker in simulator/device (color space issue)

ios,xcode,colors,color-space

I've had tremendous troubles with this. And I finally figured it out. Apple uses sRGB for iOS. To do this you must save your pdf (convert to) in sRGB. I do this with Illustrator -> new -> profile = "web", color space = "RGB" -> save as PDF -> (in...

Convert color to RRRGGGBBB

c#,winforms,colors,rgb,ini

Try this: Byte[] SeatL1 = new UTF8Encoding(true) .GetBytes("L1=" + r2.BackColor.R.ToString("000") + ", " + r2.BackColor.G.ToString("000") + ", " + r2.BackColor.B.ToString("000")); fsNew.Write(SeatL1, 0, SeatL1.Length); ...

Call user defined Color using Color.FromName, Visual Basic

vb.net,string,colors

You can't use Color.FromName like this, but you don't need to use it. Since your CustomBackColor is of type System.Drawing.Color you can use it directly to any property of type System.Drawing.Color pbR001C03.BackColor = GlobalBackColor here is the method description From MSDN: Creates a Color structure from the specified name of...

Color Transfer: What's wrong with my code in OpenCV C++

c++,opencv,colors

In your main function you should probably bound your result values by upper & lower limits [0; 255], not take a modulo. If li = 256; then code li = (int)li % 256; will make it zero.

Selectioncolor doesn't work within KeyPress event

c#,winforms,colors,selection,keypress

You want to handle a command key (Control) and that won't happen in a standard KeyPress event. To do that you have to override ProcessCmdKey method on your form. protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { if (keyData == (Keys.Control|Keys.Z)) { if (undoList.Count > 0) { ignoreChange =...

Change Form color constantly

c#,forms,winforms,colors

To start with, your current code doesn't work, but not because of any threading issue (although that does need to be solved). The issue is that these lines never get hit: custom = Color.FromArgb(contr, contg, contb); this.BackColor = custom; The logic in your while loops just don't work. The values...

Python Opencv Color range histogram

python,opencv,colors

I found a really nice method to solve my problem: LAB colorspace is a nice colorspace to compare colors. Difference of squares formula. Example code: red_bgr = (0,0,255) # red pixel pixel = (2,2,245) # pixel to compare red_lab = cv2.cvtColor(pixel1, cv2.COLOR_BGR2LAB) pixel_lab = cv2.cvtColor(pixel1, cv2.COLOR_BGR2LAB) deltaE = sqrt(abs(red_lab[0] -...

Scrolling through colors effect in RGB

colors,rgb

As you mentioned in your edit, you don't like the sequence of colours, because you start from black an end at white, instead of starting at one end of the rainbow and going to the other. So you are going to need to work out a sequence of RGB that...

How do I color individual cells of a JTable based on the value in the cell?

java,swing,colors,jtable,tablecellrenderer

There is a relationship between the data/model and the view/table. The model maintains the "what", the view controls the "how". JTable provides a means by which you can the behaviour of the "how" (stuff gets rendered) through the use of TableCellRenderers, these are responsible for determining how a cell should...

Storing colours in a database

mysql,sql,colors,sqldatatypes

The performance difference will be small. In general, operators (>>, &, etc) and function calls (CONV, etc) are not as significant as fetching the record. To that end, if you have a large table (gigabytes), shrinking the datatypes is the most important thing to do. This will shrink the data,...

OpenCV convert color per pixel

android,opencv,image-processing,colors,pixel

I recommend this excellent article on how to access/modify an opencv image buffer. I recommend "the efficient way": int i,j; uchar* p; for( i = 0; i < nRows; ++i) { p = I.ptr<uchar>(i); for ( j = 0; j < nCols; ++j) { p[j] = table[p[j]]; } Or "the...

javascript,html,css,button,colors

Pure CSS Change your button to another element (like span) Use a label and checkbox to control the toggle status Use :checked CSS selector and + sibling selector .H1toH5 input { display: none; } .H1toH5 .seatButton { padding: 5px; border: 1px solid #ccc; background: yellow; } .H1toH5 input:checked + .seatButton...

How to visualize three separate arrays representing hue, saturation, and value in python?

python,matplotlib,colors,data-visualization,hsv

imshow expects RGB(A) values: http://matplotlib.org/api/axes_api.html?highlight=imshow#matplotlib.axes.Axes.imshow but the color module has a function to translate HSV to RGB: http://matplotlib.org/api/colors_api.html?highlight=hsv#matplotlib.colors.hsv_to_rgb so you'll want to make a MxNx3 array of your HSV data translated into RGB, and then imshow that. But hue doesn't have all the information needed to make an RGB value...

How to plot colors on CIE 1931 Color Space in Matlab?

matlab,plot,colors,scatter-plot,color-space

As pointed out by horchler, the mistake was in my color conversion (RGB to XYZ to xyY) which I had done external to MATLAB. On correcting the error, the following code produced the desired result. cieplot(); hold on x=[0.42 0.38 0.388 0.352 0.344 0.281] y=[0.48 0.45 0.5 0.45 0.452 0.352];...

White lines in gradient.rect from R's plotrix package

r,colors,gradient,plotrix

I was able to reproduce the problem (although not that image) with this code: png();plot(x=seq(as.Date("1979-05-04"),as.Date("1990-11-28"),length=50), 1:50,type="n",axes=FALSE) # set up plot coords correctly plotrix::gradient.rect(as.Date("1979-05-04"),5, as.Date("1990-11-28"),6, col=plotrix::smoothColors("royalblue", 100.0,"white"), border=NA,gradient="x",nslices=121); dev.off() Then I saw three thin, white vertical bands. I looked at the RGB values and plotted their hexadecimal equivalents: plot(NA, xlim=c(1,110),ylim=c(0x4169E1, 0xFFFFFF)...

Python: list of strings, change color of character if found (using xlsxwriter)

python,colors,xlsxwriter

You can do this with XlsxWriter's write_rich_string() method. Here is a small working example: from xlsxwriter.workbook import Workbook workbook = Workbook('sequences.xlsx') worksheet = workbook.add_worksheet() red = workbook.add_format({'color': 'red'}) green = workbook.add_format({'color': 'green'}) sequences = [ 'ACAAGATG', 'CCATTGTC', 'CCCCGGCC', 'CCTGCTGC', 'GCTGCTCT', 'CGGGGCCA', 'GGCCACCG', ] worksheet.set_column('A:A', 40) for row_num, sequence in enumerate(sequences):...

How I insert color in a border of EditText?

android,colors

create a xml file with the below code into the drawable folder as "edittextborder.xml" <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <solid android:color="#FDEEF4" /> <corners android:radius="15dp" /> <stroke android:width="1dip" android:color="#2B65EC" /> </shape> where #2B65EC represents the border of the edittext color. "#2B65EC" - ocean blue Also refer this one to the Edittext code as...

Android color for Material Design

android,colors,material-design

Here is a complete list of all the material design colors you will ever need. If you're looking for good color combinations for your app, then check out Material Palette Edit: Here is an XML file containing all(?) of the Material design colors....

Formatting Text Color In JTextArea

java,swing,colors,jtextarea

You need to use a JTextPane for multiple colors. Check out the Message Console which allows you to redirect messages to the text pane. You can also control the text color for the "err" and "out" messages....

Setting color palette in R

r,colors

you can create your own pallette for ggplot pallette_yellow_green <- c("#ffff00", "#d4e100", "#bfd300", "#95b500", "#80a600", "#6a9700", "#558800", "#2b6b00", "#155c00", "#003400") and then ggplot()+scale_fill_manual(values = pallette_yellow_green) how to find color codes? use for example http://www.colorhexa.com/ (go for gradient generator) that settles the issue for discrete variable for continuous variables scale_fill_continuous or...

How to set the marker color when using geojson.Feature

colors,geojson,marker

Yes, you can manipulate the marker colors with a marker-color key inside the properties object. You pass it a hex color like {"marker-color":"#FFF"}. I assume you will be doing this inside your for doc in citymap_cursor: loop - something like point_list.append(Feature(geometry=doc['point_latlng'],properties={'marker-color':'#FFF'}))

Displaying a color according with HSBcolor.Lerp?

c#,unity3d,colors,hsb

You have a image for the color range that you wish to interpolate shown as a rectangle and its tempting to think that one end is distinct from the other but it fact HSB colors are better represented as a circle (so you can more clearly see what's happening) The...

How to get the pixel value on the a-axis and b-axis of CIELAB image

java,opencv,image-processing,colors,rgb

You're misunderstanding the structure of a 3-channel OpenCV Mat and the output of dump. If you look here you'll find the following diagram which shows the internal structure of a 3-channel Mat. The table is colored blue, green and red, but it's the same structure for any 3-channel Mat, including...

ggplot2 geom_bar group stack order factor

r,colors,ggplot2,geom-bar

What comes to my mind immediately is the arrange function from dplyr (which essentially does nothing but to order a dataframe - "Arrange rows by variables."): ggplot(arrange(mdat,variable,desc(value)), aes(variable, value, fill=day)) + geom_bar(stat="identity", position="stack")+coord_flip() ...

Replacing multiple CSS color values simultaneously

javascript,jquery,css,colors

So the problem is that you can't actually select elements by their css values, but you can access the stylesheets attached to the document and do some pretty funky things with them. A little bit of a different method here. No extra classes have to be added. No external libraries...

Is there a way to programmatically darken the color given RGB values?

r,colors,rgb

library(colorspace) cols <- c("#CDE4F3","#E7F3D3","#F7F0C7","#EFCFE5","#D0D1E7") cols1 <- readhex(file = textConnection(paste(cols, collapse = "\n")), class = "RGB") #transform to hue/lightness/saturation colorspace cols1 <- as(cols1, "HLS") cols2 <- cols1 #additive decrease of lightness [email protected][, "L"] <- pmax(0, [email protected][, "L"] - 0.3) #multiplicative decrease of lightness [email protected][, "L"] <- [email protected][, "L"] * 0.75 #going...

Limit the color variation in R using scale_color_grey

r,colors,ggplot2

I think this code should produce the plot you want. However, without your exact dataset, I had to generate simulated data. ## Generate dummy data and load library library(ggplot2) df4 = data.frame(Remain = rep(0:1, times = 4), Day = rep(1:4, each = 2), Genotype = rep(c("wtb", "whd"), each = 4),...

matplotlib fill_between does not cycle through colours

python,numpy,matplotlib,colors

Strange, it seems that even calling ax._get_patches_for_fill.set_color_cycle(clist) or ax.set_color_cycle(np.roll(clist, -1)) explicitly doesn't reinstate the color cycle (see this answer). This may be because fill between doesn't create a conventional patch or line object (or it may be a bug?). Anyway, you could manually call a cycle on the colors like...

How to change ViewPort3D background color in WPF?

c#,wpf,colors,background,viewport3d

Viewport3D is a control that creates a 3D scene for you to render things into. It does not display anything by itself. If you want a background color behind it, then set the background color on its parent control, which in your case is the Grid that contains it.

Converting images from RGB to HSL and back again with julia

image,colors,type-conversion,julia-lang,color-space

Until Color.jl gets updated and more testing implemented/passed, you can make a single character change in Color/src/conversions.jl to most likely fix this particular issue. Change - to + on line 156. 150 # Everything to HSL 151 # ----------------- 152 153 function convert{T}(::Type{HSL{T}}, c::AbstractRGB) 154 c_min = min(c.r, c.g, c.b)...

How to allow users the ability to customise their own area - colours or wallpaper

colors,wallpaper

Here's a simple solution I made in jsfiddle. http://jsfiddle.net/tycyy15L/5/ window.onload = function() { var boxlength = document.getElementsByClassName("coloredBox").length; for(i = 0; i < boxlength; i++){ document.getElementsByClassName("coloredBox")[i].onclick = function(){ document.body.style.backgroundColor = this.style.backgroundColor; } } } (see js fiddle for the rest) and cookie version. If it needs to be permanent, you'll most...

Text colouring in CSS within lists

css,colors

If I'm getting your question correct, then your css was wrong you need to do this <ul id="nav"> <li>cats</li> </ul> <ul> <li>dogs</li> </ul> #nav li {color:green} ...

How can I have different background colors in the same animation?

css,animation,colors,background,animated

you can add another class name to your existing class names something like <li class="hvr-underline blue"><a href="#">Button1</a></li> <li class="hvr-underline green"><a href="#">Button2</a></li> <li class="hvr-underline red"><a href="#">Button3</a></li> <li class="hvr-underline yellow"><a href="#">Button4</a></li> In CSS you can add another def something like .hvr-underline.blue:before { background:blue; } .hvr-underline.green:before {...

assign RGB values in java with nested for function

java,colors,rgb,pixels,javax.imageio

You have to change this line img.setRGB(W,H,newrgb) to this one img.setRGB(j,i,newrgb).

Repositioning button in HTML5?

javascript,html5,button,colors

You didn't wrap the reset button in a center tag. This <FORM> <INPUT TYPE="button" onClick="history.go(0)" VALUE="Refresh"> </FORM> </body> should be like this <center> <FORM> <INPUT TYPE="button" onClick="history.go(0)" VALUE="Refresh"> </FORM> </center> </body> (I added some indentation for beauty and legibility. It never hurts to write nice looking code.)...

C++ game color needed

c++,colors,pacman

I found parts of this code on the internet, and parts of it I wrote myself. I made a class named Colour and overloaded the operator<<. The code is as below: #ifndef COLOUR_H #define COLOUR_H #include <iostream> #include <windows.h> inline void SetColour (WORD val) { SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), val); } class Colour...

Shaded tittle does not displayed properly

html,css,colors,background-color,shadow

It's not a question for stackoverflow, anyway, why don't you go with the giraffe color and a smooth shadow? <h1 style="background-color:#FFFFFF;font-family:'HelveticaNeue-Light', 'Helvetica Neue Light', 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;font-weight:300;font-size:27px;letter-spacing:2px;text-shadow: 2px 2px 1px rgba(0,0,0, .4);color: #f8bf63;text-align:center;letter-spacing:2px;border:2px solid;border-radius:25px;border-color:#CCCC99;box-shadow:10px 5px 5px...

kivy: press button -> change color of a label

python,canvas,colors,label,kivy

The easiest way is to use an intermediary property from kivy.properties import ListProperty class ColourLabel(Label): ellipse_colour = ListProperty([1, 0, 0, 1]) Then in the kv <ColourLabel>: canvas.before: Color: rgba: self.ellipse_colour Ellipse: size: self.size pos: self.pos Note that I added the pos to Ellipse, which is presumably necessary in general. You...

Different colors in browser [closed]

css,firefox,colors,difference,color-profile

I checked it with browser's color picker and it showed right color (#5cb85c) You should understand that #5cb85c is just an RGB value an by itself doesn't specify a color. The value only has meaning when you also know the colorspace. In sRGB #5cb85c is one color, but in...

JavaFX - how to get background color of Tab, Button, etc

java,animation,colors,javafx,background

As far as I know, there is no way in the public API to determine what is being currently used as the background color for a Region (including for a Control) (unless you know it is either set by an inline style, in which case you can parse the result...

Android notification InboxStyle() with colored string

android,string,colors,notifications,spannable

Change you flag in setSpan on Spannable.SPAN_EXCLUSIVE_EXCLUSIVE spannable.setSpan(new ForegroundColorSpan(Color.GREEN), 0, text.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); UPDATE NotificationCompat.Builder builder = new NotificationCompat.Builder( this).setSmallIcon(R.drawable.ic_launcher); NotificationCompat.InboxStyle inboxStyle = new NotificationCompat.InboxStyle(); inboxStyle.setBigContentTitle("title"); inboxStyle.setSummaryText("summarytext"); String lineFormatted = "test"; Spannable sb = new...

how to generate light and pastel colors randomly in android?

java,android,colors

I don't understand why you add different numbers to each channel. Currently the result would be that you generate primarily red colors. Also if you put a leading 0 in front of a number it is interpreted as an octal number. In other words it is interpreted as base 8....

Actionbar background color changes on scale

android,colors,android-actionbar,scale

R.color.teleblue is a resource identifier not a #AARRGGBB color. Depending on what type actionBar is some of following options may or may not be available: actionBar.setBackgroundResource(R.color.teleblue); // if it's Toolbar actionBar.setBackgroundDrawable( // if it's ActionBar new ColorDrawable( actionBar.getThemedContext().getResources().getColor(R.color.teleblue)); actionBar.setBackgroundDrawable( // if it's ActionBar ContextCompat.getDrawable( actionBar.getThemedContext(), R.color.teleblue)); actionBar.setBackgroundDrawable( // if it's...

Lab-image values on both of a and b axises exceeds the range

java,opencv,image-processing,colors,javacv

Results for L*a*b* conversion on 8-bit images is automatically scaled: RGB <-> CIE Lab* (CV_BGR2Lab, CV_RGB2Lab, CV_Lab2BGR, CV_Lab2RGB). ... This outputs 0 <= L <= 100, -127 <= a <= 127, -127 <= b <= 127. The values are then converted to the destination data type: 8-bit images L <-...

VBA for changing font and colour of a cell if a certain word is typed in it

excel,vba,excel-vba,fonts,colors

Maybe you're looking for something along the lines of: Sub CheckRevision() Dim CurCell As Object For Each CurCell In ActiveWorkbook.ActiveSheet.Range("A1:AZ500") If CurCell.Value = "Revision" Then CurCell.Interior.Color = RGB(0,204,0) Next End Sub Or equivalently, you can probably use conditional formatting. Home Tab > Conditional Formatting > Highlight Cells Rules > Text...

JNI C++ to Java 32 bit image not showing properly

java,c++,colors,bitmap,jni

Isn't this just a mix in the order of the color components? I'm not familiar with any of these functions, but I believe that DIB_RGB_COLORS gives you the components in the “blue, green, red, reserved” order, whereas TYPE_4BYTE_ABGR is expecting the components in the “alpha, blue, green, red” order....

Change button color using keyboard shortcut C# WPF

wpf,colors,control,inputbinding

The command you are creating (boldShortCut) is never being setup to do anything. A RoutedCommand only fires an event when it is activated. There needs to be a command binding somewhere up the tree that listens for the event and performs some logic. Take a look at this page for...

How can I control the color and opacity of each point in a python scatter plot?

python,colors,opacity,scatter-plot,4d

I would do something like the following: import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D # choose your colormap cmap = plt.cm.jet # get a Nx4 array of RGBA corresponding to zs # cmap expects values between 0 and 1 z_list = np.array(z_list) # if z_list...

Build a colorbar from a grayscale image

java,c++,c,colors

Take the HSB system. Set S to 100 (full saturation). Set B to 100 (maximum brightness). I suppose your grey in in [0,255], set H to (1-(grey/255.0))*240. This will roughly produces something like the given picture. When grey=0, H will be 240° so blue, and when grey=255, H will be...