Documentation for themes
Playing around with themes I'm facing certain difficulties:
- how are the colour values converted/calculated from/to HEX colour notation (0x98a12a -> #??????) probably here.
- ~~how to map the cryptic
Settings/SNPColorto something human friendly.~~
I'm ready to devote some time to make such document but I need to find a way to grasp those things first.
Edit: I think I'm able to figure out the second point after second look at the sources.
Assuming that #?????? represents an HTML color.
Since WinMerge uses the Win32API COLORREF type to represent colors, the conversion from HTML color is as follows, with the RGB order reversed:
#rrggbb → 0x00bbggrr Example: #c1d2e3 → 0x00e3d2c1
Changing to your desired color in the Options window and then exporting it to an INI file using the Export button can be helpful.
Do you mind if I turn the info I gathered so far into a short page in the Wiki?
thank you! I've unlocked the Wikipages, so I think you can edit it.
Working on a template I stumbled upon those settings that seems to miss a UI for changing them. At least it seems so. Should I include them in the template? Probably the Settings/Image* should be left out but what about others?
DefaultSyntaxColors/Color14
DefaultSyntaxColors/Color15
DefaultSyntaxColors/Color16
DefaultSyntaxColors/Color17
DefaultSyntaxColors/Color18
DefaultSyntaxColors/Color19
Settings/ImageBackColor
Settings/ImageColorDistanceThreshold
Settings/ImageDiffColorAlpha
The colors below are related to word difference colors, but are not actually used as Settings/*WordDifference* is used instead. You can include it in the color schema file or not. (included in other color scheme files)
DefaultSyntaxColors/Color14 # COLORINDEX_HIGHLIGHTBKGND1 = Settings/SelectedWordDifferenceColor
DefaultSyntaxColors/Color15 # COLORINDEX_HIGHLIGHTTEXT1 = Settings/SelectedWordDifferenceTextColor
DefaultSyntaxColors/Color16 # COLORINDEX_HIGHLIGHTBKGND2 = Settings/WordDifferenceColor
DefaultSyntaxColors/Color17 # COLORINDEX_HIGHLIGHTTEXT2 = Settings/WordDifferenceTextColor
DefaultSyntaxColors/Color18 # COLORINDEX_HIGHLIGHTBKGND3 = Settings/WordDifferenceDeletedColor
DefaultSyntaxColors/Color19 # COLORINDEX_HIGHLIGHTBKGND4 = Settings/SelectedWordDifferenceDeletedColor
The colors below are settings related to image comparison. There is no need to include it in the color schema file.
Settings/ImageBackColor # Background color of transparent parts set with Image → Set Background Color menu item
Settings/ImageColorDistanceThreshold # Color distance threshold set with Image → Ignore Color Difference (Color Distance Threshold) menu item. This is not a color.
Settings/ImageDiffColorAlpha # Transparency set by Block Alpha in Location Pane. This is not a color.