colors

Fill-in color on triangle using mouse click

I was wondering how to fill in a triangle shape with color when a user click on the triangle. So far I am using txt file as input file to read the coordinate of the triangle to be drawn on screen. ...

How do I test the visual accessibility of web pages under development?

When developing websites, I'd like to be able to quickly switch to "what does this look like to a person with certain types of color blindness?" I've found Visicheck, which will show you approximations of what an image or a public web page will look like. Is there something I could use on my local development before a site goes live? ...

How do I create a random hex string that represents a color?

I'm generating some charts that need a hex string for the colors. Example: <dataseries name="ford" color="FF00FF" /> I'm creating these dynamically, so I would like to generate the hex code for each dataseries randomly. What is the best way to do this? ...

Swing UIManager.getColor() keys

is there a list somewhere of the UIManager.getColor() keys for Swing? I can't seem to find it online, just occasional references to strings like "Panel.background" and "Table.selectionBackground". ...

Get Tk winfo_rgb() without having a window instantiated

I know I can call Tkinter.Tk().winfo_rgb(color) to get a tuple of values that represent the named color. for instance Tkinter.Tk().winfo_rgb("red") returns (65535, 0, 0) The problem is it also opens a window. I was hoping to abstract some color calculations into a generic color class, and handle whether or not the class was instantiat...

Text colors in an NSTableColumn on highlight

I've got an column of cells in an NSTableView that get their text color from the app's preference plist. I want to set the text color to white when highlighted, but have been unable to figure out a good way to do this. Anybody got any ideas? ...

How to calculate an RGB colour by specifying an alpha blending amount?

I'm writing a colour picker that gets the pixel RGB values from wherever you point to on the screen. I want to also have the option of specifying that the colour I picked already has an alpha value. I'm just wondering how I can calculate the resulting colour. For example: The resulting pixel colour is 240,247,249 but I know that the ...

Setting background color for datagrid row in Adobe Flex

Hi Folks, I need to programmatically change the background color for a single row in a datagrid in Flex. I've scoured the Net and found reference to "dg.setPropertiesAt," which is not a supported method (according to the compiler). Also, there are suggestions to extend the dg's "drawRowBackground" method but I need to set the backgrou...

Visual Studio Fonts and Colors: need more customizability

For example, I want class fields, method names, and properties to be boldfaced, but I don't want them to be boldfaced inside method bodies. e.g., public static void **WriteStuff**(string notEvenUsed) { var x = 0; Console.WriteLine("Stuff"); } I want WriteStuff to be in bold, but not WriteLine, x, or notEvenUsed. ...

Do all developers consider monitor quality (colors, not resolution) to be irrelevant?

I especially hear it from those advocates of "business" notebooks manufactured by IBM/Lenovo, HP, Dell (maybe) that "business users do not need quality screens". They stick in the worst possible LCDs out there (even if with a high resolution) and dare to sell that crap. You can't even distinguish hue variations like light-yellow vs. ligh...

How do I reset a .NET Windows Forms TextBox BackColor property?

The default behavior of property BackColor of a TextBox is as follows: when enabled, it is White (SystemColors.Window), when disabled it is Gray (not sure what SystemColor this is). If I change the BackColor property, the same color is used for both Enabled and Disabled. How do I reset the BackColor property (after it has been changed ...

color dialog box

I need to get the colors which added in custom color box in colordialog window. ...

Change text cursor (caret) colour in Cocoa?

Hello! Does anyone know if it’s possible to change the text cursor (aka caret) colour in Cocoa? I need to create a textfield which would change its caret colour depending on something. Please notice that I’m not talking about the mouse pointer picture, but the blinking vertical line which helps you understand where you are typing :-) ...

Image browse by color/color range: need examples and/or code

At some long-ago Flash conferences I recall seeing a demo of a Flash app that had a color picker. Based on the user's color choice the app would show the user a set of images within the approximate range of that color: a bunch of mostly red images, a bunch of mostly blue images, etc. I'm looking for two things: 1) A link to a demo of ...

How could I store a color in a database field?

I have to store colors in database. How could I store a color in a best manner in the database field?, by color name or something else?? ...

OpenGL Color Matrix

How do I get the OpenGL color matrix transforms working? I've modified a sample program that just draws a triangle, and added some color matrix code to see if I can change the colors of the triangle but it doesn't seem to work. static float theta = 0.0f; glClearColor( 1.0f, 1.0f, 1.0f, 1.0f ); glClearDepth(1.0); glClear( GL_COLOR_B...

WPF Color interpolation

Hello, I am trying to paint a WPF control's background based on a palette where each color has been assigned with values (e.g. Red = 0, DarkGreen = 10, Green = 20,LightGreen =30) and a user-selected value (e.g. 25) that would give the resulting color. I would like the resulting color to be an interpolation between the 2 nearest color va...

Resharper 4.5 has stolen my colour scheme! Can anyone help?

I'm not sure exactly what went wrong here, but Resharper 4.5 RTM seems to have stolen my visual studio colour theme. I normally use Fredrik Kalseth's wicked theme, and I've been using Resharper since version 2.0. Never before has this happened - not even while using the 4.5 Beta. My scheme remained in tact without detremental interferenc...

Changing fill color of MovieClip Actionscript 3

Hi, i want to ask, how to change only fill color of an instance on the stage - i can do it by using ColorTransform object, but it changes color of the whole instance, not just the fill. I want to change only the fill color, not the stroke color. can anybody help me? this is my code: function paint(){ var myColorTransform:ColorTrans...

C#: Create a lighter/darker color based on a system color

Duplicate How do I adjust the brightness of a color? How do I determine darker or lighter color variant of a given color? Programmatically Lighten a Color Say I have var c = Color.Red; Now I want to create a new Color that is lighter or darker than that color. How can I do that without too much hassle? ...