Solved

Changing Palette Values to GrayScale

Posted on 1999-01-06
1
250 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

856 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