Solved

Setting 0-255 RGB Intensity in a 256 Color Palette

Posted on 1997-06-21
2
599 Views
Last Modified: 2012-08-14
Hello,
I am an amateur C/C++ programmer currently programming for Dos in MSVC 1.52 without MFC support.
I would like to know of a way to remap a 256-color screen palette, so that each color is composed of a RGB triplet.
However, the way that I found to do this only allows to set a 0-63 value for each RGB component.
What procedure do I need to use in order to be able to set each RGB component in a range of 0-255?

Thanks in advance to anyone who helps me out,
Sincerely,
EnigMasterMind.
0
Comment
Question by:enigmastermind
2 Comments
 
LVL 4

Accepted Solution

by:
AVaulin earned 50 total points
ID: 1164013
You must change current palette. The easiest way to do this is using some libraries which allows to do this. For example PCX Toolkit by Genus Microprograming Co. Also this toolkit allow to do many useful things for graphics in DOS.
Try and good luck.
0
 
LVL 1

Expert Comment

by:mosfet
ID: 1164014
The reason you can't find a way to have an RGB value of 0-255 in 256 color mode is because there isn't one. RGB values of 0-63 define 256 colors. RGB values of 0-255 define Truecolor 16.7 million colors. Of course this is going to be SVGA.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

808 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