Palette Change - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Palette Change

alberto_togliaalberto_toglia Posts: 1Member
When I load a PCX file in Pascal, it changes all the other palettes of my game. What im trying to do , is to make a main menu in my game that has pcx images in it. I have tried many ways but im starting to feel that its imposible. Is it any way to have my both palettes (pcx file colors and svga pascals 256 colors) work together normaly? I need the answer urgently THANKS.


  • blipblip Posts: 756Member
    Maybe you could go through the decompressed pixel values and the palette of the PCX and match up the pixel colors as best as possible using your palette. It won't come out perfect nor be super fast, but it should come out.


    ... 04 C3 03 ...


    ... 04 03 03 03 ...
    | | | |
    | | | |
    | +--+--+
    | |
    | |
    | $3F3F3E -> $3F3F3F -> the correct palette index (screen pixel value)
    +-$212324 -> $222222 -> the correct palette index (screen pixel value)

    ... ...

    / /
    || ||
    PCX palette Your palette (finding the closest values to the PCX's)

Sign In or Register to comment.