colors

OpenGL Color Interpolation across vertices

Right now, I have more than 25 vertices that form a model. I want to interpolate color linearly between the first and last vertex. The Problem is when I write the following code glColor3f(1.0,0.0,0.0); vertex3f(1.0,1.0,1.0); vertex3f(0.9,1.0,1.0); . .`<more vertices>; glColor3f(0.0,0.0,1.0); vertex3f(0.0,0.0,0.0); All the vertices exc...

Setting glutBitmapCharacter color?

Just wondering if someone can help me track down my issue with the following code where the text color is not being set correctly (its just rendering whatever color is in the background) void RenderText(int x, int y, const char *string) { int i, len; glUseProgram(0); glLoadIdentity(); glColor3f(1.0f, 1.0f, 1.0f); glTranslatef(0.0f, 0....

Invert the 1bbp color under a rectangle.

I am working with GDI+, the image I am working with is a 1bbp image. What i would like to do is draw a rectangle on the image and everything under that rectangle will be inverted (white pixels will become black and black pixels become white). All of the sample code I have seen is for 8 bit RGB color scale images, and I don't think the t...

How to get Xvfb to work on 32 bit color

Can anybody tell me how to get Xvfb to work on 32bit color? Vnc4server works fine for example, but didn't fit my purpose. > /etc/X11# Xvfb :1 -screen 0 1600x1200x24 error opening security policy file /etc/X11/xserver/SecurityPolicy (EE) XKB: Couldn't open rules file /usr/share/X11/xkb/rules/base Could not init font path element /usr/sha...

Changing color of HighlighBrushKey in XAML

Hi, I have the following problem. The background color in a ListView is set LightGreen or White, whether a boolflag is true or false. Example Screen Window1.xaml: <Window.Resources> <Style TargetType="{x:Type ListViewItem}"> <Style.Triggers> <DataTrigger Binding="{Binding Path=BoolFlag}" Value="True"> ...

WPF FlowDocument - Fonts only black and white

Our app has a WPF FlowDocumentScrollViewer that shows a flowdocument with text in three font colors: Lavender, #FFFFFFE8, and Orange. The background of the Viewer is set to transparent, with the window behind it having a Black background. This works fine for everybody except for one customer. For him, the Lavender colored text shows u...

CMYK 2 RGB Problem

I have a problem with converting a CMYK Color to RGB. In the internet there is many formulas to convert it but for example when I convert CMYK (0,100,100,0) to RGB, it get value (255 0 0) but in Adobe Photoshop RGB value is (237,28,36) and I want this one. Is anybody know how to convert it with java or .NET? ...

In Silverlight Grid, Disable row color change on mouse hover on row?

Hi How to disable color change (to gray) when mouse hover on a row of grid? How to disable color change (to gray) when row is selected by mouse click or keyboard/Enter combination? I want to keep the originally assigned row color. Please advice.Thanks AJ ...

Constructing colours for maximum contrast

I want to draw some items on screen, each item is in one of N sets. The number of sets changes all the time, so I need to calculate N different colours which are as different as possible (to make it easy to identify what is in which set). So, for example with N = 2 my results would be black and white. With three I guess I would get all ...

Muliple Foreground Colors in Powershell in One Command.

I want to output many different foreground colors with one statement. PS C:\> Write-Host "Red" -ForegroundColor Red Red This output is red. PS C:\> Write-Host "Blue" -ForegroundColor Blue Blue This output is blue. PS C:\> Write-Host "Red", "Blue" -ForegroundColor Red, Blue Red Blue This output is magenta, but I want the color to...

Implementing ToArgb()

Hello -- System.Drawing.Color has a ToArgb() method to return the Int representation of the color. In Silverlight, I think we have to use System.Windows.Media.Color. It has A, R, G, B members, but no method to return a single value. How can I implement ToArgb()? In System.Drawing.Color, ToArgb() consists of return (int) this.Value; ...

Background custom button animation using WPF

Hi, I am using Resources dictionaries to customize my controls and apply them as themes to my WPF application so I have implemented one for the button control. A code snippet for my custom Button.xaml is (its namespace is MyWPFApp.Themes): <ResourceDictionary ...> ... <LinearGradientBrush x:Key="NormalBackground" ...

Visual Studio Colour Settings

I've got a custom colour set in Visual Studio and one of the colours when debugging is making things a bit of a misery. Unfortunately I can't figure out which one it is, and when going through and changing all the light background ones, it still remains. Can anyone point me in the right direction? In this screenshot the current line is ...

How to change colors for ListView, alternating row color?

I have a couple of list views, one uses TextViews laid out with xml, the other uses a custom class derived from View. The default halloween color scheme is pretty ugly. How can I change the background and selection colors for the list elements. Ideally, I'd like to be able to do this in code not xml, to handle the custom view. Thanks...

How to change the outlining hover color in VS 2010?

If i hover over the thin vertical bar on the left, it highlights the entire scope of the block that's to the right. When this scope is large, my entire screen flashes white (a consequence of my custom color scheme). Is there a way to change that color? i don't recall there being one when i made the theme. ...

convert color image into black and white image using php gd library

hi i m having a page in which users upload their images to convert into black and white image.. i tried some of the code from internet but it works only for jpeg image when i upload some gif or png images it shows an full black image or the same image with the same color scale... any codes appreciated.. regards vijay. ...

How to give color to your code in open-office-writer?

I have code blocks written in Open Office Write and want colorize it. How can I do this? EDIT: When I copy syntax-highlighted code back to open office writer it becomes black again. How can I change this? ...

Hex web colours

Hi I am displaying a colour as a hex value in php . Is it possible to vary the shade of colour by subtracting a number from the hex value ? What I want to do it display vivid web safe colour but if selected I want to dull or lighten the colour. I know I can just use two shades of colour but I could hundred of potential colours . to be ...

Any way to make GtkProgressBar have a transparent background?

So far I've not been able to find any way to make the background of a GtkProgressBar transparent. I've tried setting a transparent image as the background, but the alpha channel is ignored. Can this be done? ...

How to colorize section headings in LaTeX like this?

Hi, Accidently I created this nice colored effect on my LaTeX TOC: http://i43.tinypic.com/o5aptl.png Which I like and want to keep, I created this effect like this: \definecolor{Section1}{rgb}{0.09,0.21,0.36} \section{\color{Section1}Introdução} However, as you can see on the TOC sidebar, there was a nasty side effect. I tried to f...