colors

How do I write a RGB color value in JavaScript?

I am trying to change the color of the function swapFE() below and I can't figure out how to write it. I was told to change the color of the phrase node to the color value (155, 102, 102). I tried to do that as you can see at the end of the function see- parent.childNodes[1].style.color= (155, 102, 102); but it just comes out a dark navy...

How to set background color of a View

I'm trying to set the background color of a View (in this case a Button). I use this code: // set the background to green v.setBackgroundColor(0x0000FF00 ); v.invalidate(); It causes the Button to disappear from the screen. What am I doing wrong, and what is the correct way to change the background color on any View? Thanks. ...

How to find all the colors in a photo with Ruby

Does anyone know of a Ruby library that can list all of the colors in a photo, as well as listing them in order of frequency? Or is it possible that RMagick already can do something like this? If no one knows of one, how exactly could I get started on making such a tool? I have a great idea for a program I'd love to try, however I jus...

How to check if two System.Drawing.Color structures represent the same color in 16 bit color depth?

How can I check if two System.Drawing.Color structures represent the same color in 16 bit color depth (or generally based on the value of Screen.PrimaryScreen.BitsPerPixel)? Let's say I set Form.TransparencyKey to Value1 (of Color type), I want to check that when the user selects a new background color for the form (Value2), I don't set...

change background colour for Visual Studio Code Editor

How can we change the background colour for Visual Studio Code Editor? ...

Translucent colors in Java through properties files

Hi all, Is it possible to specify a color in a properties file that has an alpha component? When I put a hexadecimal number in the properties file that has an alpha channel, the alpha is ignored. I notice that the decode method of string says "Converts a String to an integer and returns the specified opaque Color.", and that the only ...

convert font to string and back again

Hello, i have an application where my user changes font and font color for different labels etc and they save it to a file but i need to be able to convert the font of the specified label to a string to be written to file, and then when they open that file my program will convert that string back into a font object. How can this be done...

Problem with listView background and foreground colors when listView is sorted

I have listView in my (C#) program. I change some items background and foreground colors after I have added items to listview. All items are OK and Colors too. If I use sorting with listView, then all first 6 items colors have been disappeared. And some colors of rest items are in disorder. This effect happens with default sorting and my...

C#: Background color problem

I am having trouble with background colors in C#. For some reason they are simply not working. Specifically on the System.Windows.Forms.Panel control. Setting the BackColor property does nothing. All I have is gray and all the efforts I have made will not change it. Is there something that could be overriding this? Am I approaching this ...

How can I use variables to DRY up Vim colorthemes

I would like to tidy up my Vim color scheme file, by replacing #ABCDEF colors with variables. For example, I would like to replace this: highlight String guifg=#61CE3C highlight Identifier guifg=#61CE3C highlight Type guifg=#84A7C1 with something like this (pseudo-code vimscript): my_string =#61CE3C my_type =#84A7C1 high...

Capturing the effects of SetConsoleTextAttribute when redirected through a Pipe?

I've redirected stdout of a child process spawned with CreateProcess to a pipe. It works fine except that, as far as I can tell, no information about color changes are coming through. The child process is using SetConsoleTextAttribute to change the text color--is it possible to detect this through the pipe and, if so, how? I'm ultimat...

Changing background color of ListView items on Android

How can I change background color of ListView items on a pair-item basis. When I use android:backgroundColor in the ListView item layout I can achieve this, however the list selector is no longer visible. I can make the selector visible again by setting drawSelectorOnTop to true but then the selector overlays the whole item. Any ideas h...

Help with changing slider colors on an iphone

I need to change slider colors in my iphone app, and I put This: - (UISlider *)ratioSlider { UIImage *stetchLeftTrack = [[UIImage imageNamed:@"grayslide.png"] stretchableImageWithLeftCapWidth:10.0 topCapHeight:0.0]; UIImage *stetchRightTrack = [[UIImage imageNamed:@"grayslide.png"] ...

convert HSL or HSV to RGB via jquery

Hi, I'm looking to generate random "similar" colors using jquery. It is my understanding that the best way to approach this is using HSL or HSV, according to this question. The issue is I can't seem to figure out how to either… Use HSL or HSV with jquery; or Convert HSL or HSV to RBG via jquery I found this color library, but ...

Background color for GTK_WINDOW_TOPLEVEL Gtk Widget

In the following code, I want the background colour of the main GTK_WINDOW_TOPLEVEL to be 0xc0deed. But when I run it is appearing black. I even tried gtk_drawing_area_new and adding it to the main window. But still it is appearing black although I could get other colours like red, blue, white etc #include <gtk/gtk.h> int main( int arg...

How do I replace colours in a movieclip?

I am trying to take a movieclip of a character and change the colour of their clothes. The character is comprised of vectors. So far I have semi-sucessfully used this method: stop the movieclip take the bitmap data from the current frame use threshold to replace the colour store the resulting bitmap data in an array add an onenterfram...

What is the color format to use with imagerotate() in PHP?

In PHP; what format is used for the background color option in the function imagerotate(). $color = "???????"; imagerotate($image, $degrees, $color); I have tried: $color = "#FFFFFF"; $color = "255255255"; ...

OpenCV - How does it handle color profiles?

I have a jpeg. Its color profile is sRGB, of course. I load it into "image" and call cvCvtColor(image, gray, CV_BGR2GRAY); to convert it to grayscale. When I step into that routine in the debugger, I find it multiplying pixels by these values: #define cscGr_32f 0.299f #define cscGg_32f 0.587f #define cscGb_32f 0.114f Waaaai...

How to fill countries in a world map using ASP.NET?

Hi, My client has customers in 100 countries in which a customer can have access to more than a country. So, to show visual appearance to the customer, our client want to show world map and fill each country with a different color where the customer has access to. Is there anyway to do this in ASP.NET? If not ASP.NET, Is their any thi...

iPhone context: How do i extract palette information from an image?

Hi everybody: i want to take a picture and retrieve the main color analyzing its palette (i think this should be the easiest way), but i don't know really where to start. ...