Author Topic: palette RGB values in text format  (Read 6235 times)

Offline bladum

  • Colonel
  • ****
  • Posts: 213
  • Bladum
    • View Profile
palette RGB values in text format
« on: December 31, 2014, 05:07:44 pm »
Folks,

Can someone (like Falko) can share RGB values of battlescape palettes used in UFO and TFTD (depth 0) ? Could be as arrays in any format or language like Java or C or YAML. Just need it as a text not a palette file it self.

Thanks and have a happy new year :)

Thanks
Tom

Offline volutar

  • Colonel
  • ****
  • Posts: 351
  • Vanilla digger & Quality assistant
    • View Profile
Re: palette RGB values in text format
« Reply #1 on: December 31, 2014, 05:26:14 pm »
just txt, decimal values, 3 per line, comma separated
you can adjust to fit any language static array.
for xcom and all 4 palettes for xcom2.

Offline bladum

  • Colonel
  • ****
  • Posts: 213
  • Bladum
    • View Profile
Re: palette RGB values in text format
« Reply #2 on: December 31, 2014, 05:39:11 pm »
thanks

but there are only 4 files in zip not 5 so i think ufo1 is missing
« Last Edit: December 31, 2014, 05:49:29 pm by bladum »

Offline volutar

  • Colonel
  • ****
  • Posts: 351
  • Vanilla digger & Quality assistant
    • View Profile
Re: palette RGB values in text format
« Reply #3 on: December 31, 2014, 06:15:16 pm »
forgot palette from xcom1

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: palette RGB values in text format
« Reply #4 on: December 31, 2014, 07:34:09 pm »
There should be a place to centralize this kind of resources, otherwise they tend to become forgotten in the middle of all the forum posts.

Offline bladum

  • Colonel
  • ****
  • Posts: 213
  • Bladum
    • View Profile
Re: palette RGB values in text format
« Reply #5 on: December 31, 2014, 07:39:06 pm »
thanks

have anyone tried to use nearest color method to convert TFTD images into UFO ?

like this one

https://www.emanueleferonato.com/2009/08/28/color-differences-algorithm/

Offline volutar

  • Colonel
  • ****
  • Posts: 351
  • Vanilla digger & Quality assistant
    • View Profile
Re: palette RGB values in text format
« Reply #6 on: December 31, 2014, 07:46:51 pm »
bladum, why are you asking?

there are image converters to/from xcom format.

my mcd/pck editor can convert them pretty ok (I made this nearest color conversion, of course).

Offline bladum

  • Colonel
  • ****
  • Posts: 213
  • Bladum
    • View Profile
Re: palette RGB values in text format
« Reply #7 on: December 31, 2014, 07:48:31 pm »
i wonder what was the algorithm exactly, just based on RGB or some more conversion to different color models like CMYK or LAB

lets assume we want to use port images from TFTD into standard UFO palette by finding visually most similar colors. Simple RGB wont work in this case. I tried Falko palette converter and in most images it worked ok. But i dont understand why there are 3 options to choose from. There can be only one nearest color set...

could you explain how use your editor to do this ?
« Last Edit: December 31, 2014, 07:54:46 pm by bladum »

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: palette RGB values in text format
« Reply #8 on: December 31, 2014, 08:57:16 pm »
i am currently a bit busy (and not capable -> slooowwww internet) to do much
i can upload the palettes in text form sometimes next week
to the xcom1 txt file i saw here thats a bit screwed in my opinion
there is the color "48, 0, 0," three times - the color data generated from the palette data (for ufo battlscape) from warboy there are no color indices with the same values as mentioned here https://openxcom.org/forum/index.php/topic,1321.msg32646.html#msg32646
if the 3 options that is talked about here that is in regard to this topic
https://openxcom.org/forum/index.php/topic,2327.msg25051.html#msg25051
davide made 2 conversion styles (with some software) i did one manually for tftd->ufo-battlescape
for some images (like terrain) davides was better for other base images mine looked better

Offline volutar

  • Colonel
  • ****
  • Posts: 351
  • Vanilla digger & Quality assistant
    • View Profile
Re: palette RGB values in text format
« Reply #9 on: December 31, 2014, 09:14:54 pm »
to the xcom1 txt file i saw here thats a bit screwed in my opinion
there is the color "48, 0, 0," three times - the color data generated from the palette data (for ufo battlscape) from warboy there are no color indices with the same values as mentioned here https://openxcom.org/forum/index.php/topic,1321.msg32646.html#msg32646
there are ambiguous colors in vanilla xcom palettes. it's how they are. for sdl screwed algorithms tho, warboy had to disambiguate them. but with that they stop being vanilla.

i see only 2 different conversion modes - without dithering, and with patterned (ordered) dithering. but i wouldn't suggest using dithering at all, better to edit them by hands, if anything.

bladum, my editor is capable of handling PCKs only (32x40 pixels), either for MCDs, or for units. You can save the set into png sheets with one palette, change current palette, and import png sheet.
« Last Edit: December 31, 2014, 10:21:29 pm by volutar »