For this I used three tools.
Paint Color Comparison Chart by Scott Sobieraj
Vim for Windows free text editor
Gimp for Windows free image editor
If you did not do so far, please download and install them.
Furthermore download and unzip the attached C2Pplugin.vim.zip file.
1. Download the Paint Color Comparison Chart in a manageable format
Open Paint Color Comparison Chart in your favorite browser
In Google Spreadsheet: File | Download as | Web Page (.html, zipped)
unzip to a desirable location
2. Generate color mapping
Open vim and the paint range
Open vim, on Windows you can access it at Start | All Apps | Vim 8.0 | Vim
For beginners, the most important command is
Code:
:q!
If you made a mistake, press 'Esc' a couple of times, then pressing 'u' will undo the changes made so far.
Furthermore with right mouse click you can paste selected commands into vim.
So if you do not wish to type much, just copy the CODE snippets below, and with right click paste them one by one into vim. Finally press 'Enter', as the command buffer (the line on the bottom) is not executed all the time.
Load the attached vim functions
Code:
:source DOWNLOAD_PATH/C2Pplugin.vim
Open the html sheet of a given paint range (please replace DOWNLOAD_PATH with the location of the Paint Color Comparison Chart):
Code:
:e DOWNLOAD_PATH/Paint Color Comparison Chart/Vallejo Model Color.html
Code:
:call C2PCreatePaletteData()
Code:
1 70.951 255 255 255 White 2 70.820 239 238 226 Offwhite 3 70.918 239 241 217 Ivory 4 70.928 254 237 208 Light Flesh 5 70.837 209 196 156 Pale Sand 6 70.917 219 197 142 Beige ...
Code:
:w! vmc_palette.txt
3. Create the GIMP palette
The user's GIMP palette can be found in C:/Users/USERNAME/.gimp-2.8/palettes/, we will add ours there
Create the GIMP palette file and add header:
From this palette data file we can generate the GIMP palette:
Code:
:call C2PCreateGimpPalette('VMC')
4. Converting Image in GIMP
Export image
I used a Bloodletter image from http://warhammer40k.wikia.com . For this tutorial I shrinked it by a factor of 10.
So the input image will be:
GIMP is used to convert an RGB image (representing the colors you can see with your eyes) to indexed image (representing the paints you have)
File | Open...
Image | Mode | Use Custom Palette: VMC | Dithering: Floyd-Steinberg (Remove unused colors from colormap should be turned off!!!) | Convert
File | Export as | HTML table
The dithered image looked like this:
This HTML page is unusable, though, contains only color indices and needs some conversion to display the paints and colors correctly.
5. Create a digestable HTML page
Open the html image in vim
Code:
:e DOWNLOAD_PATH/HTML_IMAGE_NAME.html
Pick your favorite palette file, in this case vmc_palette.txt and apply to the HTML file
Code:
:call C2PReplacePalette('vmc_palette.txt') :w!
The result should look something like this:
vBulletin Message