Solved

Changing Palette Values to GrayScale

Posted on 1999-01-06
1
249 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

776 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