Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Setting 0-255 RGB Intensity in a 256 Color Palette

Posted on 1997-06-21
2
Medium Priority
?
617 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
[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
2 Comments
 
LVL 4

Accepted Solution

by:
AVaulin earned 100 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

Technology Partners: 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

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…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

705 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