Solved

Changing Palette Values to GrayScale

Posted on 1999-01-06
1
251 Views
Last Modified: 2010-04-04
I can´t figure out how to change the palette of my application to support 64 different colors in grayscale, ranging from white(0) to black(63).
0
Comment
Question by:skaba
1 Comment
 

Accepted Solution

by:
ptiemann2 earned 100 total points
ID: 1354998
This question is _very_ general..

1) do you mean how to convert a RGB value to 6 bit greyscale?

or

2) do you mean to have a palette of 64 grey values displayed correctly in Windows (which is a little difficult if you have a 256 colors-only environment.. you need to handle a few wm_paletteXXX messages)

Let me know and I'll be able to help then.

The conversion (r,g,b) --> grey is a sum LIKE this:

grey = r * 0.33 + g * 0.4 + b * 0.27

I don't have the exact values at hand.. it has to do with the fact that the human eye is more sensitive to blue than to red.
I can look it up for you if need this.

Let me know more before you grade this answer..
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Delphi Mdi application Child forms get behind control 7 308
find a node in VST 2 78
Adoquery sql  left join does not work 25 104
Delphi android app hide keyboard 3 41
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question