colors

How to turn off colors in ZSH shell? Make it black and white with unicode support!!!

Once when I got my hand on openbsd I was really happy to have black and white terminal, I, somehow, orienting much more with b/w colors.. Anyway I know just one option to do it. export TERM="linux-m" and openbsd used something else like "vt8.." i don't remember. Now I have freebsd on my dedicated server, I want to have black and w...

32 bit color version of TImageList for Delphi 7.

I'm hoping someone knows of an enhanced TImageList for Delphi 7 that supports 32 bit (alpha channel) bitmaps (for a TTreeView). Ideally free . Or perhaps how to extend/configure the stock TImageList to handle the alpha channel properly in 32 bit color bitmaps. ...

What is the point of styling hyperlinks to be barely distinguishable from body text?

It seems like there is an increasingly popular trend to style hyperlinks in a color that's barely distinguishable from body text. I noticed this just the other day on an SFGate blog page. Also notice that link just a few words ago. Are my eyes getting worse, or is that hard to spot? I certainly understand styling hyperlinks to look bett...

Possible combinations of colours

Say I have a list of 2 colours, Black and White. It's only possible to have 1 combination using these colours, because you can't have two of the same. If I have 3 colours (Black, White and Red), there are 3 possible combination (Black+White, Black+Red, White+Red). If I have 4 colours, there are 5 possible combinations and if I have 5 c...

Javascript color gradient

Using javascript with or without Jquery, I need to a create a gradient of colours based on a start and finish color. Is this possible to do programmatically? The end colour is only ever going to be darker shade of the start colour and it's for an unordered list which I have no control over the number of li items. I'm looking for a solut...

A Photoshop Design question from a programmers point of view

Every time I design websites in Photoshop, I slice up the elements I want to bring into my html page. I am experiencing a problem where the css-ruled background colors vary from the same color saved in photoshop. Consider this example: There is a square div with a background color of #080808. In photoshop, I slice up an image that will ...

PHP GD: need to find out an alpha quantity

Imagine this. I have a pixel of color (255,0,0) [red]. No someone painted on it with white color with * alpha. I know the background color, I know with what color it was painted over, I need to get the alpha of the painted over color. How? So far we have: $im = imagecreatefrompng('public/images/bg-tmp.png'); // we need to find a neare...

Calculate CMYK coverage on PDF

Hi all, I don't suppose is there any free or open source libraries out there that able to calculate the CMYK coverage on a pdf file. I tried looking around I don't seem to able to find any. If there isn't any out there if anyone could point me in the right direction of what do I need to do in order to calculate the CYMK coverage on a pd...

JList where each line might need to have a different font-color

Hello everyone, I am a newbie here just joined this wonderfull community. I have to admit this is the best site out there for programming questions and answers. Now let me get to the point: I am trying to create a JList where I can input lines with different font colors taken from a ColorChooser. I have tried something already as descri...

Finding images with pure colours

I've read a number of questions on finding the colour palette of an image, but my problem is slightly different. I'm looking for images made up of pure colours: pictures of the open sky, colourful photo backgrounds, red brick walls etc. So far I've used the App Engine Image.histogram() function to produce a histogram, filter out values ...

Using 3-digit color codes rather than 6-digit color codes in CSS

I recently went through my CSS file and switch all my 6-digit hexadecimal codes to simple 3-digit codes (for example, my #FDFEFF got shortened to #FFF). It renders pretty much the exact same color as before, it seems to me that the in between parts are fairly useless and removing them saved me an entire 300 bytes in my CSS file. Does it...

OpenGL blending (Java)

I'm writing some Java OpenGL code (though the principles are the same in C++ openGL). I have a situation where I want to render certain items on top of others. I can do that by disable the depth test or by setting it to GL_ALWAYS) for those items and that works well. The issue is that colors of those items on top seem to be darkened by t...

given a background color, how to get a foreground color that make it readable on that background color?

given a background color, how to get a foreground color that make it readable on that background color? ps: I mean computing that foreground color automatically in a program. or simplify the problem, if the foreground color is chosen from white/blank, how to do the choise in a program? ...

OpenGL unwanted color fading problem on triangle strip. Want to get uniform color over the triangle

Hello everyone, Here's my problem. I'm drawing a box using a GL_TRIANGLE_STRIP. There is no texture involved, no material and no shaders. I'm just rendering colored triangle. You can see what it looks like here : Fail box But as you can see, I've some clear color fading problem. There is no lighting activated either. Here the code I...

How to draw crosshatches on a TCanvas and specify the background color

I'm trying to make a "blank" background to place an image on top of. It's not too difficult to create crosshatches by placing a TImage on a form and doing the following: image1.Canvas.brush.Style := bsDiagCross; image1.canvas.brush.color := clWhatever; image1.canvas.FillRect(image1.clientrect); This works, and I get a crosshatch patt...

VBA lookup data in seperate document and different columns according to specific criteria!

Hello, Please could anyone help? Attached please find the example. The sheet (in document 2) is seperated into 3 parts: part 1: The second column has codes starts with MLR (yellow background) -> look up data on document 1 ( column 4 & 5). part 2: The second column has codes starts with SP (yellow background)-> look up data on docum...

Custom TextArea - Colors enabled (for an html editor)

I am looking for a tool/textarea that would provide a dreamweaver-like code area, or even notepad++, with code highlighting and intellisens, intelisens can be added afterward, but if its there its even better. The point is to add visual help to whoever is doing web editing with the component. Is there any kind of tool that could do this...

Linux / C / GTK+ Set GtkTextView background to the default window colour

I want to set the GtkTexetView background colour to the window's default colour so that it looks like a GtkLabel. Take a look at these images, but please note that I want it for C and not PHP, and I use GNOME, not MS Windows. ...

Color Remapping - Matching target palette using a 3D grid?

Let's say I have color 'FOO', and it is stored in RGB format. I need to recolor 'FOO' so it matches the closest color in a list of colors. Doing this on the fly, couldn't I view the RGB values from each color as points on a 3D grid (r=x, g=y, b=z) and compute the distance between point 'FOO' vs the points from each color in the list? ...

Formula For Calculating Opposite ("Difference") For Hexadecimal Color

how can i create an opposite of a hexadecimal color? for example, i'd like to convert 0x000000 (black) into 0xFFFFFF (white), or 0xFF0000 (red) into 0x00FFFF (cyan). those are rather basic colors, while variants of colors can have more complex hexadecimal values, such as 0x21B813 (greenish). are bitwise operators required for this? m...