RGB to MSX Colors

Página 1/2
| 2

Por Rogerup

Resident (39)

imagem de Rogerup

22-03-2019, 14:22

Looking for how to convert RGB colors to MSX1 colors (with no dithering), I wanted to find the color on the palette closest to the original RGB color, I found the CIEDE2000 algorithm very interesting.

The image is an example of the conversion, this conversion is just the graphical part of a project that will run on MSX, games written in PuzzleScript.

I made available the C code that transforms an RGB color into one of the MSX1 colors, with several algorithms, including the CIE2000 which would be the most modern and complex method and that managed to generate the closest colors.

It would be cool if someone who made a screen-converter without this method, tried the CIEDE2000 method to see the results. My program does not convert the entire images, only 8x8 sprites.

To use the code just call:
cMSX1SetPalette (); // to initialize
cMSX1Compare (R, G, B, CLAB_CIE2000); // return color 1 to 15
C Code
H Code

it's very easy to change the c code for other palettes.
Create a palette and call:
cPaletteFill( palette, num_of_colors );
then use:
cPaletteCompare(R, G, B, cmethod); // it returns the palette position

Entrar ou registrar-se para comentar

Por LeandroCorreia

Paladin (963)

imagem de LeandroCorreia

23-03-2019, 03:21

I did a converter in the past, just for fun. I implemented the CIEDE2000 routine for color distance and results were pretty impressive IMHO...
Commercial Photography

Por LeandroCorreia

Paladin (963)

imagem de LeandroCorreia

23-03-2019, 03:26

Another one...

Commercial Photography

Por wimpie3

Champion (438)

imagem de wimpie3

23-03-2019, 18:13

Wow! Impressive!

Por dumfrog

Resident (45)

imagem de dumfrog

23-03-2019, 19:16

@LeandroCorreia : where is your converter downloadable ? It would be very useful !

Por ericb59

Paragon (1125)

imagem de ericb59

23-03-2019, 21:22

nice !
Would be cool to share your converter

Por LeandroCorreia

Paladin (963)

imagem de LeandroCorreia

23-03-2019, 21:42

Not available for download (yet). I did just as a test in Blitz Basic. I'll try to clean my crappy code (I'm a designer, not a programmer) to make it more readable and I'll let the source code available soon.

Por LeandroCorreia

Paladin (963)

imagem de LeandroCorreia

23-03-2019, 21:51

And BTW, don't overestimate it. I use some tricks to make images more suitable for conversion first, such as increasing contrast and using a sharpen filter to compensate the loss of resolution. Wink

Por sd_snatcher

Prophet (3675)

imagem de sd_snatcher

24-03-2019, 00:47

AFAIK, MIFui has CIEDE2000 as one of its conversion algorithms.

Por paulwratt

Supporter (4)

imagem de paulwratt

24-03-2019, 10:00

A while ago I started writing a set of tools exactly for this occasion. It is called programmers palettes and its is mennt to suppliment @denilsonsa's gimp-palettes.


You are looking for info in the MSX palettes page.



Por Louthrax

Prophet (2496)

imagem de Louthrax

24-03-2019, 12:01

sd_snatcher wrote:

AFAIK, MIFui has CIEDE2000 as one of its conversion algorithms.

Hi Snatcher,
I sent you several test versions with CIEDE2000 and other color-distance methods, but I have not made that public yet... I had the feeling something was weird, still need to check. Maybe the sources released above by Rogerup will help.

Página 1/2
| 2