Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Changing Palette Values to GrayScale

Posted on 1999-01-06
1
Medium Priority
?
257 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
ptiemann2 earned 400 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
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…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

597 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