diff --git a/lib/themes/Default.theme b/lib/themes/Default.theme
index 1695b5215f..1db4c56f18 100644
--- a/lib/themes/Default.theme
+++ b/lib/themes/Default.theme
@@ -1,97 +1,99 @@
-#LyX version: 2.5.0
+#LyX version: 2.6.0
 #
-#   This is a definition file of a color theme "Default" of LyX
+#   This is a definition file of color theme "Default" of LyX
 #
 #   Author: Koji Yokota
 #
 #   Syntax: \set_color "color name" "light color" "dark color"
 #
-\set_color "added_space" "#a52a2a" "#a52a2a"
-\set_color "appendix" "#a52a2a" "#a52a2a"
-\set_color "background" "#faf0e6" "#000000"
-\set_color "bookmark" "#4169e1" "#4169e1"
-\set_color "bottomarea" "#666666" "#cccccc"
-\set_color "branchlabel" "#c88000" "#c88000"
-\set_color "buttonbg" "#dcd2c8" "#dcd2c8"
-\set_color "commandbg_broken" "#ff0000" "#ff0000"
-\set_color "buttonhoverbg_broken" "#db0b0b" "#db0b0b"
-\set_color "buttonhoverbg" "#c7c7ca" "#c7c7ca"
-\set_color "buttonframe" "#dcd2c8" "#dcd2c8"
-\set_color "commandframe_broken" "#ff0000" "#ff0000"
-\set_color "changebar" "#0000ff" "#86a4ff"
-\set_color "changedtextauthor1" "#0000ff" "#86a4ff"
-\set_color "changedtextauthor2" "#ff00ff" "#ee86ee"
-\set_color "changedtextauthor3" "#ff0000" "#ea8989"
-\set_color "changedtextauthor4" "#aa00ff" "#c371ec"
-\set_color "changedtextauthor5" "#55aa00" "#acd780"
-\set_color "changedtextcomparison" "#008080" "#719fb0"
-\set_color "addedtext" "#0000ff" "#0000ff"
-\set_color "deletedtext" "#ff0000" "#ff0000"
-\set_color "deletedtextmodifier" "#ffffff" "#ffffff"
-\set_color "collapsibleframe" "#cd5c5c" "#cd5c5c"
-\set_color "collapsible" "#8b0000" "#8b0000"
-\set_color "command" "#000000" "#000000"
-\set_color "command_broken" "#ffffff" "#ffffff"
-\set_color "commandbg" "#f0ffff" "#f0ffff"
-\set_color "commandframe" "#000000" "#faf0e6"
-\set_color "commentbg" "#faf0e6" "#000000"
-\set_color "comment" "#ff00ff" "#808000"
-\set_color "cursor" "#000000" "#faf0e6"
-\set_color "depthbar" "#cd5c5c" "#cd5c5c"
-\set_color "eolmarker" "#a52a2a" "#a52a2a"
-\set_color "footlabel" "#00aaff" "#0000ff"
-\set_color "graphicsbg" "#faf0e6" "#000000"
-\set_color "greyedoutbg" "#faf0e6" "#000000"
-\set_color "greyedout" "#ff0080" "#ff0080"
-\set_color "greyedouttext" "#cccccc" "#666666"
-\set_color "indexlabel" "#008000" "#008080"
-\set_color "inlinecompletion" "#999999" "#666666"
-\set_color "nonuniqueinlinecompletion" "#cccccc" "#999999"
-\set_color "insetbg" "#cccccc" "#cccccc"
-\set_color "insetframe" "#cd5c5c" "#cd5c5c"
-\set_color "insetlabel" "#000000" "#000000"
-\set_color "language" "#0000ff" "#86a4ff"
-\set_color "error" "#ff0000" "#8b0000"
-\set_color "latex" "#8b0000" "#d66613"
-\set_color "listingsbg" "#ffffff" "#000000"
-\set_color "marginlabel" "#aa55ff" "#800080"
-\set_color "mathbg" "#faf0e6" "#000000"
-\set_color "mathcorners" "#faf0e6" "#000000"
-\set_color "mathframe" "#ff00ff" "#ff00ff"
-\set_color "mathline" "#0000ff" "#86a4ff"
-\set_color "mathmacrobg" "#ede2d8" "#000000"
-\set_color "mathmacroblend" "#000000" "#faf0e6"
-\set_color "mathmacroframe" "#ede2d8" "#000000"
-\set_color "mathmacrohoverbg" "#cdc3b8" "#cccccc"
-\set_color "mathmacrolabel" "#a19992" "#a19992"
-\set_color "mathmacronewarg" "#000000" "#faf0e6"
-\set_color "mathmacrooldarg" "#cccccc" "#666666"
-\set_color "math" "#00008b" "#85f0fe"
-\set_color "newpage" "#0000ff" "#86a4ff"
-\set_color "nomlabel" "#ff6d2f" "#ff6d2f"
-\set_color "notebg" "#ffff00" "#5b5903"
-\set_color "note" "#ffff00" "#ff6200"
-\set_color "pagebreak" "#4169e1" "#4169e1"
-\set_color "paragraphmarker" "#cccccc" "#666666"
-\set_color "phantomtext" "#7f7f7f" "#7f7f7f"
-\set_color "preeditbg" "#faf0e6" "#000000"
-\set_color "preeditfocus" "#add8e6" "#add8e6"
-\set_color "preeditfocustext" "#000000" "#000000"
-\set_color "preedittext" "#000000" "#faf0e6"
-\set_color "previewframe" "#000000" "#faf0e6"
-\set_color "preview" "#000000" "#faf0e6"
-\set_color "regexpframe" "#008000" "#00ff00"
-\set_color "scroll" "#cd5c5c" "#cd5c5c"
-\set_color "selectionmath" "#00008b" "#00008b"
-\set_color "selectiontext" "#000000" "#000000"
-\set_color "selection" "#add8e6" "#add8e6"
-\set_color "shaded" "#ff0000" "#f2af7d"
-\set_color "special" "#4169e1" "#4169e1"
-\set_color "tabularline" "#000000" "#faf0e6"
-\set_color "tabularonoffline" "#b0c4de" "#23497b"
-\set_color "foreground" "#000000" "#faf0e6"
-\set_color "textlabel1" "#0000ff" "#86a4ff"
-\set_color "textlabel2" "#008000" "#00ff00"
-\set_color "textlabel3" "#ff00ff" "#ff00ff"
-\set_color "urllabel" "#0000ff" "#0000ff"
-\set_color "urltext" "#0000ff" "#86a4ff"
+\set_color "cursor_inverted" "#fffaf0e6" "#ff000000"
+\set_color "error" "#ffff0000" "#ff8b0000"
+\set_color "latex" "#ff8b0000" "#ffd66613"
+\set_color "foreground_inverted" "#fffaf0e6" "#ff000000"
+\set_color "urllabel" "#ff0000ff" "#ff0000ff"
+\set_color "urltext" "#ff0000ff" "#ff86a4ff"
+\set_color "cursor" "#ff000000" "#fffaf0e6"
+\set_color "command" "#ff000000" "#ff000000"
+\set_color "command_broken" "#ffffffff" "#ffffffff"
+\set_color "commandbg" "#fff0ffff" "#fff0ffff"
+\set_color "commandframe" "#ff000000" "#fffaf0e6"
+\set_color "commentbg" "#fffaf0e6" "#ff000000"
+\set_color "comment" "#ffff00ff" "#ff808000"
+\set_color "bookmark" "#ff4169e1" "#ff4169e1"
+\set_color "scroll" "#ffcd5c5c" "#ffcd5c5c"
+\set_color "textlabel1" "#ff0000ff" "#ff86a4ff"
+\set_color "textlabel2" "#ff008000" "#ff00ff00"
+\set_color "textlabel3" "#ffff00ff" "#ffff00ff"
+\set_color "buttonhoverbg" "#ffc7c7ca" "#ffc7c7ca"
+\set_color "buttonhoverbg_broken" "#ffdb0b0b" "#ffdb0b0b"
+\set_color "preview" "#ff000000" "#fffaf0e6"
+\set_color "previewframe" "#ff000000" "#fffaf0e6"
+\set_color "listingsbg" "#ffffffff" "#ff000000"
+\set_color "buttonbg" "#ffdcd2c8" "#ffdcd2c8"
+\set_color "commandbg_broken" "#ffff0000" "#ffff0000"
+\set_color "buttonframe" "#ffdcd2c8" "#ffdcd2c8"
+\set_color "commandframe_broken" "#ffff0000" "#ffff0000"
+\set_color "mathmacrohoverbg" "#ffcdc3b8" "#ffcccccc"
+\set_color "shaded" "#ffff0000" "#fff2af7d"
+\set_color "bottomarea" "#ff666666" "#ffcccccc"
+\set_color "graphicsbg" "#00faf0e6" "#00000000"
+\set_color "pagebreak" "#ff4169e1" "#ff4169e1"
+\set_color "depthbar" "#ffcd5c5c" "#ffcd5c5c"
+\set_color "footlabel" "#ff00aaff" "#ff0000ff"
+\set_color "added_space" "#ffa52a2a" "#ffa52a2a"
+\set_color "language" "#ff0000ff" "#ff86a4ff"
+\set_color "inlinecompletion" "#ff999999" "#ff666666"
+\set_color "nonuniqueinlinecompletion" "#ffcccccc" "#ff999999"
+\set_color "eolmarker" "#ffa52a2a" "#ffa52a2a"
+\set_color "insetlabel" "#ff000000" "#ff000000"
+\set_color "insetbg" "#ffcccccc" "#ffcccccc"
+\set_color "insetframe" "#ffcd5c5c" "#ffcd5c5c"
+\set_color "indexlabel" "#ff008000" "#ff008080"
+\set_color "collapsible" "#ff8b0000" "#ff8b0000"
+\set_color "collapsibleframe" "#ffcd5c5c" "#ffcd5c5c"
+\set_color "newpage" "#ff0000ff" "#ff86a4ff"
+\set_color "math" "#ff00008b" "#ff85f0fe"
+\set_color "mathbg" "#00faf0e6" "#00000000"
+\set_color "mathframe" "#ffff00ff" "#ffff00ff"
+\set_color "mathmacrooldarg" "#ffcccccc" "#ff666666"
+\set_color "mathmacronewarg" "#ff000000" "#fffaf0e6"
+\set_color "mathmacrobg" "#fffaf0e6" "#ff000000"
+\set_color "mathmacroframe" "#ffede2d8" "#ff000000"
+\set_color "mathmacrolabel" "#ffa19992" "#ffa19992"
+\set_color "mathmacroblend" "#ff000000" "#fffaf0e6"
+\set_color "mathline" "#ff0000ff" "#ff86a4ff"
+\set_color "mathcorners" "#fffaf0e6" "#ff000000"
+\set_color "regexpframe" "#ff008000" "#ff00ff00"
+\set_color "selection" "#ffadd8e6" "#ffadd8e6"
+\set_color "selectiontext" "#ff000000" "#ff000000"
+\set_color "selectionmath" "#ff00008b" "#ff00008b"
+\set_color "greyedoutbg" "#fffaf0e6" "#ff000000"
+\set_color "greyedout" "#ffff0080" "#ffff0080"
+\set_color "greyedouttext" "#ffcccccc" "#ff666666"
+\set_color "paragraphmarker" "#ffcccccc" "#ff666666"
+\set_color "notebg" "#ffffff00" "#ff5b5903"
+\set_color "note" "#ffffff00" "#ffff6200"
+\set_color "special" "#ff4169e1" "#ff4169e1"
+\set_color "branchlabel" "#ffc88000" "#ffc88000"
+\set_color "background" "#fffaf0e6" "#ff000000"
+\set_color "tabularonoffline" "#ffb0c4de" "#ff23497b"
+\set_color "tabularline" "#ff000000" "#fffaf0e6"
+\set_color "appendix" "#ffa52a2a" "#ffa52a2a"
+\set_color "changedtextauthor1" "#ff0000ff" "#ff86a4ff"
+\set_color "changedtextauthor2" "#ffff00ff" "#ffee86ee"
+\set_color "changedtextauthor3" "#ffff0000" "#ffea8989"
+\set_color "changedtextauthor4" "#ffaa00ff" "#ffc371ec"
+\set_color "changedtextauthor5" "#ff55aa00" "#ffacd780"
+\set_color "changedtextcomparison" "#ff008080" "#ff719fb0"
+\set_color "changebar" "#ff0000ff" "#ff86a4ff"
+\set_color "deletedtext" "#ffff0000" "#ffff0000"
+\set_color "deletedtextmodifier" "#ffffffff" "#ffffffff"
+\set_color "addedtext" "#ff0000ff" "#ff0000ff"
+\set_color "marginlabel" "#ffaa55ff" "#ff800080"
+\set_color "foreground" "#ff000000" "#fffaf0e6"
+\set_color "phantomtext" "#ff7f7f7f" "#ff7f7f7f"
+\set_color "preeditfocus" "#ffadd8e6" "#ffadd8e6"
+\set_color "preeditfocustext" "#ff000000" "#ff000000"
+\set_color "preeditbg" "#00faf0e6" "#00000000"
+\set_color "preedittext" "#ff000000" "#fffaf0e6"
+\set_color "nomlabel" "#ffff6d2f" "#ffff6d2f"
diff --git a/lib/themes/Monochrome.theme b/lib/themes/Monochrome.theme
index 97f660f3cc..f189eddddf 100644
--- a/lib/themes/Monochrome.theme
+++ b/lib/themes/Monochrome.theme
@@ -1,97 +1,99 @@
-#LyX version: 2.5.0
+#LyX version: 2.6.0
 #
-#   This is a definition file of a color theme "Monochrome" of LyX
+#   This is a definition file of color theme "Monochrome" of LyX
 #
 #   Author: Koji Yokota
 #
 #   Syntax: \set_color "color name" "light color" "dark color"
 #
-\set_color "added_space" "#0000cd" "#8080ff"
-\set_color "appendix" "#0000cd" "#8080ff"
-\set_color "background" "#fbfbfb" "#333334"
-\set_color "bookmark" "#4169e1" "#4169e1"
-\set_color "bottomarea" "#f2f2f2" "#333334"
-\set_color "branchlabel" "#c88000" "#c88000"
-\set_color "buttonbg" "#e6e6e6" "#454547"
-\set_color "commandbg_broken" "#d90004" "#400001"
-\set_color "buttonhoverbg_broken" "#be0a0d" "#410304"
-\set_color "buttonhoverbg" "#cdcdcd" "#575759"
-\set_color "buttonframe" "#d8d8d8" "#333334"
-\set_color "commandframe_broken" "#d80004" "#400001"
-\set_color "changebar" "#0000cd" "#8080ff"
-\set_color "changedtextauthor1" "#0000cd" "#86a4ff"
-\set_color "changedtextauthor2" "#d800d8" "#ee86ee"
-\set_color "changedtextauthor3" "#da0004" "#ea8989"
-\set_color "changedtextauthor4" "#aa00ff" "#c371ec"
-\set_color "changedtextauthor5" "#468b00" "#acd780"
-\set_color "changedtextcomparison" "#008080" "#719fb0"
-\set_color "addedtext" "#0000cd" "#8080ff"
-\set_color "deletedtext" "#d90004" "#ff6668"
-\set_color "deletedtextmodifier" "#f2f2f2" "#7b7b7e"
-\set_color "collapsibleframe" "#999999" "#646467"
-\set_color "collapsible" "#272727" "#e0e0e0"
-\set_color "command" "#191919" "#e0e0e0"
-\set_color "command_broken" "#f2f2f2" "#ffffff"
-\set_color "commandbg" "#cccccc" "#333334"
-\set_color "commandframe" "#cccccc" "#e0e0e0"
-\set_color "commentbg" "#fcfcca" "#666600"
-\set_color "comment" "#272727" "#e0e0e0"
-\set_color "cursor" "#191919" "#e0e0e0"
-\set_color "depthbar" "#0000ff" "#8080ff"
-\set_color "eolmarker" "#0000cd" "#8080ff"
-\set_color "footlabel" "#0076b1" "#8080ff"
-\set_color "graphicsbg" "#fbfbfb" "#333334"
-\set_color "greyedoutbg" "#cccccc" "#333334"
-\set_color "greyedout" "#191919" "#e0e0e0"
-\set_color "greyedouttext" "#cccccc" "#666666"
-\set_color "indexlabel" "#006700" "#5fbebe"
-\set_color "inlinecompletion" "#999999" "#666666"
-\set_color "nonuniqueinlinecompletion" "#cccccc" "#999999"
-\set_color "insetbg" "#d8006c" "#410020"
-\set_color "insetframe" "#d8006c" "#995b7a"
-\set_color "insetlabel" "#191919" "#e0e0e0"
-\set_color "language" "#0000ff" "#8080ff"
-\set_color "error" "#e60004" "#8b0000"
-\set_color "latex" "#0000cd" "#8080ff"
-\set_color "listingsbg" "#fafafa" "#333334"
-\set_color "marginlabel" "#aa55ff" "#800080"
-\set_color "mathbg" "#fbfbfb" "#333334"
-\set_color "mathcorners" "#cfcffa" "#000080"
-\set_color "mathframe" "#000080" "#8080ff"
-\set_color "mathline" "#0000cd" "#8080ff"
-\set_color "mathmacrobg" "#fbfbfb" "#333334"
-\set_color "mathmacroblend" "#191919" "#faf0e6"
-\set_color "mathmacroframe" "#ede2d8" "#333334"
-\set_color "mathmacrohoverbg" "#cdc3b8" "#454547"
-\set_color "mathmacrolabel" "#a19992" "#a19992"
-\set_color "mathmacronewarg" "#191919" "#faf0e6"
-\set_color "mathmacrooldarg" "#cccccc" "#666666"
-\set_color "math" "#000080" "#aeaefa"
-\set_color "newpage" "#0000cd" "#86a4ff"
-\set_color "nomlabel" "#cd5725" "#cd5726"
-\set_color "notebg" "#fdfdca" "#666600"
-\set_color "note" "#272727" "#e0e0e0"
-\set_color "pagebreak" "#0000cd" "#8080ff"
-\set_color "paragraphmarker" "#cccccc" "#666666"
-\set_color "phantomtext" "#7f7f7f" "#7f7f7f"
-\set_color "preeditbg" "#fbfbfb" "#333334"
-\set_color "preeditfocus" "#cccccc" "#999999"
-\set_color "preeditfocustext" "#272727" "#000000"
-\set_color "preedittext" "#191919" "#e0e0e0"
-\set_color "previewframe" "#191919" "#faf0e6"
-\set_color "preview" "#191919" "#e0e0e0"
-\set_color "regexpframe" "#008000" "#00b200"
-\set_color "scroll" "#cd5c5c" "#cd6768"
-\set_color "selectionmath" "#00008b" "#0000cd"
-\set_color "selectiontext" "#272727" "#000000"
-\set_color "selection" "#cccccc" "#999999"
-\set_color "shaded" "#6666ff" "#6666ff"
-\set_color "special" "#0000cd" "#8080ff"
-\set_color "tabularline" "#272727" "#faf0e6"
-\set_color "tabularonoffline" "#999999" "#999999"
-\set_color "foreground" "#191919" "#e0e0e0"
-\set_color "textlabel1" "#0000cd" "#86a4ff"
-\set_color "textlabel2" "#008000" "#86c086"
-\set_color "textlabel3" "#9a009a" "#ff80ff"
-\set_color "urllabel" "#0000cd" "#8080ff"
-\set_color "urltext" "#0000cd" "#86a4ff"
+\set_color "cursor_inverted" "#fffaf0e6" "#ff000000"
+\set_color "error" "#ffe60004" "#ff8b0000"
+\set_color "latex" "#ff0000cd" "#ff8080ff"
+\set_color "foreground_inverted" "#fffaf0e6" "#ff000000"
+\set_color "urllabel" "#ff0000cd" "#ff8080ff"
+\set_color "urltext" "#ff0000cd" "#ff86a4ff"
+\set_color "cursor" "#ff191919" "#ffe0e0e0"
+\set_color "command" "#ff191919" "#ffe0e0e0"
+\set_color "command_broken" "#fff2f2f2" "#ffffffff"
+\set_color "commandbg" "#ffcccccc" "#ff333334"
+\set_color "commandframe" "#ffcccccc" "#ffe0e0e0"
+\set_color "commentbg" "#fffcfcca" "#ff666600"
+\set_color "comment" "#ff272727" "#ffe0e0e0"
+\set_color "bookmark" "#ff4169e1" "#ff4169e1"
+\set_color "scroll" "#ffcd5c5c" "#ffcd6768"
+\set_color "textlabel1" "#ff0000cd" "#ff86a4ff"
+\set_color "textlabel2" "#ff008000" "#ff86c086"
+\set_color "textlabel3" "#ff9a009a" "#ffff80ff"
+\set_color "buttonhoverbg" "#ffcdcdcd" "#ff575759"
+\set_color "buttonhoverbg_broken" "#ffbe0a0d" "#ff410304"
+\set_color "preview" "#ff191919" "#ffe0e0e0"
+\set_color "previewframe" "#ff191919" "#fffaf0e6"
+\set_color "listingsbg" "#fffafafa" "#ff333334"
+\set_color "buttonbg" "#ffe6e6e6" "#ff454547"
+\set_color "commandbg_broken" "#ffd90004" "#ff400001"
+\set_color "buttonframe" "#ffd8d8d8" "#ff333334"
+\set_color "commandframe_broken" "#ffd80004" "#ff400001"
+\set_color "mathmacrohoverbg" "#ffcdc3b8" "#ff454547"
+\set_color "shaded" "#ff6666ff" "#ff6666ff"
+\set_color "bottomarea" "#fff2f2f2" "#ff333334"
+\set_color "graphicsbg" "#00fbfbfb" "#00333334"
+\set_color "pagebreak" "#ff0000cd" "#ff8080ff"
+\set_color "depthbar" "#ff0000ff" "#ff8080ff"
+\set_color "footlabel" "#ff0076b1" "#ff8080ff"
+\set_color "added_space" "#ff0000cd" "#ff8080ff"
+\set_color "language" "#ff0000ff" "#ff8080ff"
+\set_color "inlinecompletion" "#ff999999" "#ff666666"
+\set_color "nonuniqueinlinecompletion" "#ffcccccc" "#ff999999"
+\set_color "eolmarker" "#ff0000cd" "#ff8080ff"
+\set_color "insetlabel" "#ff191919" "#ffe0e0e0"
+\set_color "insetbg" "#ffd8006c" "#ff410020"
+\set_color "insetframe" "#ffd8006c" "#ff995b7a"
+\set_color "indexlabel" "#ff006700" "#ff5fbebe"
+\set_color "collapsible" "#ff272727" "#ffe0e0e0"
+\set_color "collapsibleframe" "#ff999999" "#ff646467"
+\set_color "newpage" "#ff0000cd" "#ff86a4ff"
+\set_color "math" "#ff000080" "#ffaeaefa"
+\set_color "mathbg" "#00fbfbfb" "#00333334"
+\set_color "mathframe" "#ff000080" "#ff8080ff"
+\set_color "mathmacrooldarg" "#ffcccccc" "#ff666666"
+\set_color "mathmacronewarg" "#ff191919" "#fffaf0e6"
+\set_color "mathmacrobg" "#fffbfbfb" "#ff333334"
+\set_color "mathmacroframe" "#ffede2d8" "#ff333334"
+\set_color "mathmacrolabel" "#ffa19992" "#ffa19992"
+\set_color "mathmacroblend" "#ff191919" "#fffaf0e6"
+\set_color "mathline" "#ff0000cd" "#ff8080ff"
+\set_color "mathcorners" "#ffcfcffa" "#ff000080"
+\set_color "regexpframe" "#ff008000" "#ff00b200"
+\set_color "selection" "#ffcccccc" "#ff999999"
+\set_color "selectiontext" "#ff272727" "#ff000000"
+\set_color "selectionmath" "#ff00008b" "#ff0000cd"
+\set_color "greyedoutbg" "#ffcccccc" "#ff333334"
+\set_color "greyedout" "#ff191919" "#ffe0e0e0"
+\set_color "greyedouttext" "#ffcccccc" "#ff666666"
+\set_color "paragraphmarker" "#ffcccccc" "#ff666666"
+\set_color "notebg" "#fffdfdca" "#ff666600"
+\set_color "note" "#ff272727" "#ffe0e0e0"
+\set_color "special" "#ff0000cd" "#ff8080ff"
+\set_color "branchlabel" "#ffc88000" "#ffc88000"
+\set_color "background" "#fffbfbfb" "#ff333334"
+\set_color "tabularonoffline" "#ff999999" "#ff999999"
+\set_color "tabularline" "#ff272727" "#fffaf0e6"
+\set_color "appendix" "#ff0000cd" "#ff8080ff"
+\set_color "changedtextauthor1" "#ff0000cd" "#ff86a4ff"
+\set_color "changedtextauthor2" "#ffd800d8" "#ffee86ee"
+\set_color "changedtextauthor3" "#ffda0004" "#ffea8989"
+\set_color "changedtextauthor4" "#ffaa00ff" "#ffc371ec"
+\set_color "changedtextauthor5" "#ff468b00" "#ffacd780"
+\set_color "changedtextcomparison" "#ff008080" "#ff719fb0"
+\set_color "changebar" "#ff0000cd" "#ff8080ff"
+\set_color "deletedtext" "#ffd90004" "#ffff6668"
+\set_color "deletedtextmodifier" "#fff2f2f2" "#ff7b7b7e"
+\set_color "addedtext" "#ff0000cd" "#ff8080ff"
+\set_color "marginlabel" "#ffaa55ff" "#ff800080"
+\set_color "foreground" "#ff191919" "#ffe0e0e0"
+\set_color "phantomtext" "#ff7f7f7f" "#ff7f7f7f"
+\set_color "preeditfocus" "#ffcccccc" "#ff999999"
+\set_color "preeditfocustext" "#ff272727" "#ff000000"
+\set_color "preeditbg" "#00fbfbfb" "#00333334"
+\set_color "preedittext" "#ff191919" "#ffe0e0e0"
+\set_color "nomlabel" "#ffcd5725" "#ffcd5726"
diff --git a/lib/themes/Solarized.theme b/lib/themes/Solarized.theme
index 987b77b0b1..39b2073108 100644
--- a/lib/themes/Solarized.theme
+++ b/lib/themes/Solarized.theme
@@ -1,4 +1,4 @@
-#LyX version: 2.5.0
+#LyX version: 2.6.0
 #
 #   This is a definition file of color theme "Solarized" of LyX
 #
@@ -6,92 +6,94 @@
 #
 #   Syntax: \set_color "color name" "light color" "dark color"
 #
-\set_color "added_space" "#2aa198" "#2aa198"
-\set_color "appendix" "#dc322f" "#dc322f"
-\set_color "background" "#fdf6e3" "#002b36"
-\set_color "bookmark" "#268bd2" "#268bd2"
-\set_color "bottomarea" "#eee8d5" "#073642"
-\set_color "branchlabel" "#b58900" "#b58900"
-\set_color "buttonbg" "#eee8d5" "#002b36"
-\set_color "commandbg_broken" "#dc322f" "#dc322f"
-\set_color "buttonhoverbg_broken" "#dc322f" "#dc322f"
-\set_color "buttonhoverbg" "#eee8d5" "#073642"
-\set_color "buttonframe" "#93a1a1" "#586e75"
-\set_color "commandframe_broken" "#dc322f" "#dc322f"
-\set_color "changebar" "#586e75" "#586e75"
-\set_color "changedtextauthor1" "#2aa198" "#2aa198"
-\set_color "changedtextauthor2" "#d33682" "#d33682"
-\set_color "changedtextauthor3" "#cb4b16" "#cb4b16"
-\set_color "changedtextauthor4" "#b58900" "#b58900"
-\set_color "changedtextauthor5" "#859900" "#859900"
-\set_color "changedtextcomparison" "#268bd2" "#268bd2"
-\set_color "addedtext" "#cb4b16" "#cb4b16"
-\set_color "deletedtext" "#dc322f" "#dc322f"
-\set_color "deletedtextmodifier" "#fdf6e3" "#fdf6e3"
-\set_color "collapsibleframe" "#eee8d5" "#073642"
-\set_color "collapsible" "#6c71c4" "#6c71c4"
-\set_color "command" "#268bd2" "#268bd2"
-\set_color "command_broken" "#fdf6e3" "#fdf6e3"
-\set_color "commandbg" "#eee8d5" "#073642"
-\set_color "commandframe" "#586e75" "#586e75"
-\set_color "commentbg" "#eee8d5" "#073642"
-\set_color "comment" "#d33682" "#859900"
-\set_color "cursor" "#657b83" "#839496"
-\set_color "depthbar" "#2aa198" "#2aa198"
-\set_color "eolmarker" "#2aa198" "#2aa198"
-\set_color "footlabel" "#2aa198" "#2aa198"
-\set_color "graphicsbg" "#eee8d5" "#073642"
-\set_color "greyedoutbg" "#eee8d5" "#073642"
-\set_color "greyedout" "#657b83" "#839496"
-\set_color "greyedouttext" "#657b83" "#839496"
-\set_color "indexlabel" "#2aa198" "#2aa198"
-\set_color "inlinecompletion" "#93a1a1" "#586e75"
-\set_color "nonuniqueinlinecompletion" "#93a1a1" "#586e75"
-\set_color "insetbg" "#eee8d5" "#073642"
-\set_color "insetframe" "#839496" "#586e75"
-\set_color "insetlabel" "#586e75" "#93a1a1"
-\set_color "language" "#657b83" "#839496"
-\set_color "error" "#dc322f" "#dc322f"
-\set_color "latex" "#657b83" "#839496"
-\set_color "listingsbg" "#eee8d5" "#073642"
-\set_color "marginlabel" "#6c71c4" "#6c71c4"
-\set_color "mathbg" "#fdf6e3" "#002b36"
-\set_color "mathcorners" "#eee8d5" "#073642"
-\set_color "mathframe" "#657b83" "#839496"
-\set_color "mathline" "#657b83" "#839496"
-\set_color "mathmacrobg" "#eee8d5" "#073642"
-\set_color "mathmacroblend" "#657b83" "#839496"
-\set_color "mathmacroframe" "#eee8d5" "#073642"
-\set_color "mathmacrohoverbg" "#eee8d5" "#073642"
-\set_color "mathmacrolabel" "#b58900" "#b58900"
-\set_color "mathmacronewarg" "#657b83" "#839496"
-\set_color "mathmacrooldarg" "#93a1a1" "#586e75"
-\set_color "math" "#657b83" "#839496"
-\set_color "newpage" "#268bd2" "#268bd2"
-\set_color "nomlabel" "#cb4b16" "#cb4b16"
-\set_color "notebg" "#eee8d5" "#073642"
-\set_color "note" "#268bd2" "#268bd2"
-\set_color "pagebreak" "#268bd2" "#268bd2"
-\set_color "paragraphmarker" "#2aa198" "#2aa198"
-\set_color "phantomtext" "#657b83" "#657b83"
-\set_color "preeditbg" "#fdf6e3" "#002b36"
-\set_color "preeditfocus" "#eee8d5" "#eee8d5"
-\set_color "preeditfocustext" "#586e75" "#586e75"
-\set_color "preedittext" "#657b83" "#839496"
-\set_color "previewframe" "#657b83" "#839496"
-\set_color "preview" "#657b83" "#839496"
-\set_color "regexpframe" "#2aa198" "#2aa198"
-\set_color "scroll" "#cb4b16" "#cb4b16"
-\set_color "selectionmath" "#eee8d5" "#073642"
-\set_color "selectiontext" "#fdf6e3" "#002b36"
-\set_color "selection" "#93a1a1" "#586e75"
-\set_color "shaded" "#eee8d5" "#073642"
-\set_color "special" "#839496" "#657b83"
-\set_color "tabularline" "#657b83" "#839496"
-\set_color "tabularonoffline" "#93a1a1" "#586e75"
-\set_color "foreground" "#586e75" "#93a1a1"
-\set_color "textlabel1" "#268bd2" "#268bd2"
-\set_color "textlabel2" "#2aa198" "#2aa198"
-\set_color "textlabel3" "#d33682" "#d33682"
-\set_color "urllabel" "#657b83" "#839496"
-\set_color "urltext" "#586e75" "#93a1a1"
+\set_color "cursor_inverted" "#fffaf0e6" "#ff000000"
+\set_color "error" "#ffdc322f" "#ffdc322f"
+\set_color "latex" "#ff657b83" "#ff839496"
+\set_color "foreground_inverted" "#fffaf0e6" "#ff000000"
+\set_color "urllabel" "#ff657b83" "#ff839496"
+\set_color "urltext" "#ff586e75" "#ff93a1a1"
+\set_color "cursor" "#ff657b83" "#ff839496"
+\set_color "command" "#ff268bd2" "#ff268bd2"
+\set_color "command_broken" "#fffdf6e3" "#fffdf6e3"
+\set_color "commandbg" "#ffeee8d5" "#ff073642"
+\set_color "commandframe" "#ff586e75" "#ff586e75"
+\set_color "commentbg" "#ffeee8d5" "#ff073642"
+\set_color "comment" "#ffd33682" "#ff859900"
+\set_color "bookmark" "#ff268bd2" "#ff268bd2"
+\set_color "scroll" "#ffcb4b16" "#ffcb4b16"
+\set_color "textlabel1" "#ff268bd2" "#ff268bd2"
+\set_color "textlabel2" "#ff2aa198" "#ff2aa198"
+\set_color "textlabel3" "#ffd33682" "#ffd33682"
+\set_color "buttonhoverbg" "#ffeee8d5" "#ff073642"
+\set_color "buttonhoverbg_broken" "#ffdc322f" "#ffdc322f"
+\set_color "preview" "#ff657b83" "#ff839496"
+\set_color "previewframe" "#ff657b83" "#ff839496"
+\set_color "listingsbg" "#ffeee8d5" "#ff073642"
+\set_color "buttonbg" "#ffeee8d5" "#ff002b36"
+\set_color "commandbg_broken" "#ffdc322f" "#ffdc322f"
+\set_color "buttonframe" "#ff93a1a1" "#ff586e75"
+\set_color "commandframe_broken" "#ffdc322f" "#ffdc322f"
+\set_color "mathmacrohoverbg" "#ffeee8d5" "#ff073642"
+\set_color "shaded" "#ffeee8d5" "#ff073642"
+\set_color "bottomarea" "#ffeee8d5" "#ff073642"
+\set_color "graphicsbg" "#00eee8d5" "#00073642"
+\set_color "pagebreak" "#ff268bd2" "#ff268bd2"
+\set_color "depthbar" "#ff2aa198" "#ff2aa198"
+\set_color "footlabel" "#ff2aa198" "#ff2aa198"
+\set_color "added_space" "#ff2aa198" "#ff2aa198"
+\set_color "language" "#ff657b83" "#ff839496"
+\set_color "inlinecompletion" "#ff93a1a1" "#ff586e75"
+\set_color "nonuniqueinlinecompletion" "#ff93a1a1" "#ff586e75"
+\set_color "eolmarker" "#ff2aa198" "#ff2aa198"
+\set_color "insetlabel" "#ff586e75" "#ff93a1a1"
+\set_color "insetbg" "#ffeee8d5" "#ff073642"
+\set_color "insetframe" "#ff839496" "#ff586e75"
+\set_color "indexlabel" "#ff2aa198" "#ff2aa198"
+\set_color "collapsible" "#ff6c71c4" "#ff6c71c4"
+\set_color "collapsibleframe" "#ffeee8d5" "#ff073642"
+\set_color "newpage" "#ff268bd2" "#ff268bd2"
+\set_color "math" "#ff657b83" "#ff839496"
+\set_color "mathbg" "#00fdf6e3" "#00002b36"
+\set_color "mathframe" "#ff657b83" "#ff839496"
+\set_color "mathmacrooldarg" "#ff93a1a1" "#ff586e75"
+\set_color "mathmacronewarg" "#ff657b83" "#ff839496"
+\set_color "mathmacrobg" "#ffeee8d5" "#ff073642"
+\set_color "mathmacroframe" "#ffeee8d5" "#ff073642"
+\set_color "mathmacrolabel" "#ffb58900" "#ffb58900"
+\set_color "mathmacroblend" "#ff657b83" "#ff839496"
+\set_color "mathline" "#ff657b83" "#ff839496"
+\set_color "mathcorners" "#ffeee8d5" "#ff073642"
+\set_color "regexpframe" "#ff2aa198" "#ff2aa198"
+\set_color "selection" "#ff93a1a1" "#ff586e75"
+\set_color "selectiontext" "#fffdf6e3" "#ff002b36"
+\set_color "selectionmath" "#ffeee8d5" "#ff073642"
+\set_color "greyedoutbg" "#ffeee8d5" "#ff073642"
+\set_color "greyedout" "#ff657b83" "#ff839496"
+\set_color "greyedouttext" "#ff657b83" "#ff839496"
+\set_color "paragraphmarker" "#ff2aa198" "#ff2aa198"
+\set_color "notebg" "#ffeee8d5" "#ff073642"
+\set_color "note" "#ff268bd2" "#ff268bd2"
+\set_color "special" "#ff839496" "#ff657b83"
+\set_color "branchlabel" "#ffb58900" "#ffb58900"
+\set_color "background" "#fffdf6e3" "#ff002b36"
+\set_color "tabularonoffline" "#ff93a1a1" "#ff586e75"
+\set_color "tabularline" "#ff657b83" "#ff839496"
+\set_color "appendix" "#ffdc322f" "#ffdc322f"
+\set_color "changedtextauthor1" "#ff2aa198" "#ff2aa198"
+\set_color "changedtextauthor2" "#ffd33682" "#ffd33682"
+\set_color "changedtextauthor3" "#ffcb4b16" "#ffcb4b16"
+\set_color "changedtextauthor4" "#ffb58900" "#ffb58900"
+\set_color "changedtextauthor5" "#ff859900" "#ff859900"
+\set_color "changedtextcomparison" "#ff268bd2" "#ff268bd2"
+\set_color "changebar" "#ff586e75" "#ff586e75"
+\set_color "deletedtext" "#ffdc322f" "#ffdc322f"
+\set_color "deletedtextmodifier" "#fffdf6e3" "#fffdf6e3"
+\set_color "addedtext" "#ffcb4b16" "#ffcb4b16"
+\set_color "marginlabel" "#ff6c71c4" "#ff6c71c4"
+\set_color "foreground" "#ff586e75" "#ff93a1a1"
+\set_color "phantomtext" "#ff657b83" "#ff657b83"
+\set_color "preeditfocus" "#ffeee8d5" "#ffeee8d5"
+\set_color "preeditfocustext" "#ff586e75" "#ff586e75"
+\set_color "preeditbg" "#00fdf6e3" "#00002b36"
+\set_color "preedittext" "#ff657b83" "#ff839496"
+\set_color "nomlabel" "#ffcb4b16" "#ffcb4b16"
diff --git a/src/Color.cpp b/src/Color.cpp
index 3977e998c6..f277de10b4 100644
--- a/src/Color.cpp
+++ b/src/Color.cpp
@@ -41,8 +41,8 @@ struct ColorSet::ColorEntry {
 	ColorCode lcolor;
 	char const * guiname;
 	char const * latexname;
-	char const * x11hexname;
-	char const * x11darkhexname;
+	char const * hex32name;
+	char const * darkhex32name;
 	char const * lyxname;
 };
 
@@ -67,8 +67,12 @@ string const X11hexname(RGBColor const & col)
 {
 	ostringstream ostr;
 
-	ostr << '#' << setbase(16) << setfill('0')
-	     << setw(2) << col.r
+	ostr << '#' << setbase(16) << setfill('0');
+
+	if (typeid(col) == typeid(ARGBColor))
+		ostr << setw(2) << ((ARGBColor const &)col).a;
+
+	ostr << setw(2) << col.r
 	     << setw(2) << col.g
 	     << setw(2) << col.b;
 
@@ -76,14 +80,42 @@ string const X11hexname(RGBColor const & col)
 }
 
 
-RGBColor rgbFromHexName(string const & x11hexname)
+RGBColor rgbFromHexName(string const & hexname)
 {
+	// hexname accepts both 16bit and 32bit hex codes
+	LASSERT((hexname.size() == 7 || hexname.size() == 9)
+	        && hexname[0] == '#', return RGBColor());
 	RGBColor c;
-	LASSERT(x11hexname.size() == 7 && x11hexname[0] == '#',
-		return c);
-	c.r = hexstrToInt(x11hexname.substr(1, 2));
-	c.g = hexstrToInt(x11hexname.substr(3, 2));
-	c.b = hexstrToInt(x11hexname.substr(5, 2));
+	if (hexname.size() == 7) {
+		c.r = hexstrToInt(hexname.substr(1, 2));
+		c.g = hexstrToInt(hexname.substr(3, 2));
+		c.b = hexstrToInt(hexname.substr(5, 2));
+	} else {
+		c.r = hexstrToInt(hexname.substr(3, 2));
+		c.g = hexstrToInt(hexname.substr(5, 2));
+		c.b = hexstrToInt(hexname.substr(7, 2));
+	}
+	return c;
+}
+
+
+ARGBColor argbFromHexName(string const & hexname)
+{
+	// hexname accepts both 16bit and 32bit hex codes
+	LASSERT((hexname.size() == 7 || hexname.size() == 9)
+	        && hexname[0] == '#', return ARGBColor());
+	ARGBColor c;
+	if (hexname.size() == 7) {
+		c.a = 255;
+		c.r = hexstrToInt(hexname.substr(1, 2));
+		c.g = hexstrToInt(hexname.substr(3, 2));
+		c.b = hexstrToInt(hexname.substr(5, 2));
+	} else {
+		c.a = hexstrToInt(hexname.substr(1, 2));
+		c.r = hexstrToInt(hexname.substr(3, 2));
+		c.g = hexstrToInt(hexname.substr(5, 2));
+		c.b = hexstrToInt(hexname.substr(7, 2));
+	}
 	return c;
 }
 
@@ -204,39 +236,40 @@ std::ostream & operator<<(std::ostream & os, Color color)
 
 ColorSet::ColorSet()
 {
-	char const * grey40 = "#666666";
-	char const * grey60 = "#999999";
-	char const * grey80 = "#cccccc";
+	char const * grey40 = "#ff666666";
+	char const * grey60 = "#ff999999";
+	char const * grey80 = "#ffcccccc";
 	// latex colors (xcolor package)
-	char const * black = "#000000";
-	char const * white = "#ffffff";
-	char const * blue = "#0000ff";
-	char const * brown = "#bf8040";
-	char const * cyan = "#00ffff";
-	char const * darkgray = "#404040";
-	char const * gray = "#808080";
-	char const * green = "#00ff00";
-	char const * lightgray = "#bfbfbf";
-	char const * lime = "#bfff00";
-	char const * magenta = "#ff00ff";
-	char const * olive = "#808000";
-	char const * orange = "#ff8000";
-	char const * pink = "#ffbfbf";
-	char const * purple = "#bf0040";
-	char const * red = "#ff0000";
-	char const * teal = "#008080";
-	char const * violet = "#800080";
-	char const * yellow = "#ffff00";
+	char const * black = "#ff000000";
+	char const * white = "#ffffffff";
+	char const * blue = "#ff0000ff";
+	char const * brown = "#ffbf8040";
+	char const * cyan = "#ff00ffff";
+	char const * darkgray = "#ff404040";
+	char const * gray = "#ff808080";
+	char const * green = "#ff00ff00";
+	char const * lightgray = "#ffbfbfbf";
+	char const * lime = "#ffbfff00";
+	char const * magenta = "#ffff00ff";
+	char const * olive = "#ff808000";
+	char const * orange = "#ffff8000";
+	char const * pink = "#ffffbfbf";
+	char const * purple = "#ffbf0040";
+	char const * red = "#ffff0000";
+	char const * teal = "#ff008080";
+	char const * violet = "#ff800080";
+	char const * yellow = "#ffffff00";
 	// svg colors
-	char const * Brown = "#a52a2a";
-	char const * DarkRed = "#8b0000";
-	char const * Green = "#008000";
-	char const * IndianRed = "#cd5c5c";
-	char const * Linen = "#faf0e6";
-	char const * RoyalBlue = "#4169e1";
-
-	//char const * grey90 = "#e5e5e5";
-	//  ColorCode, gui, latex, x11hexname, x11darkhexname, lyx
+	char const * Brown = "#ffa52a2a";
+	char const * DarkRed = "#ff8b0000";
+	char const * Green = "#ff008000";
+	char const * IndianRed = "#ffcd5c5c";
+	char const * Linen = "#fffaf0e6";
+	char const * RoyalBlue = "#ff4169e1";
+	char const * Transparent = "#00000000";
+
+	//char const * grey90 = "#ffe5e5e5";
+	//  ColorCode, gui, latex, hex32name, darkhex32name, lyx
 	// Warning: several of these entries are overridden in GuiApplication constructor
 	// lyx color names are collected for users in Customization manual (B.# Dynamic colors)
 	static ColorEntry const items[] = {
@@ -265,60 +298,60 @@ ColorSet::ColorSet()
 	{ Color_background, N_("background"), "background", Linen, black, "background" },
 	{ Color_foreground, N_("text"), "foreground", black, Linen, "foreground" },
 	{ Color_foreground_inverted, N_("text (inverted background)"), "foreground_inverted", Linen, black, "foreground_inverted" },
-	{ Color_selection, N_("selection"), "selection", "#add8e6", "#add8e6", "selection" },
-	{ Color_selectionmath, N_("selected math"), "selectionmath", "#00008B", "#00008B", "selectionmath" },
+	{ Color_selection, N_("selection"), "selection", "#ffadd8e6", "#ffadd8e6", "selection" },
+	{ Color_selectionmath, N_("selected math"), "selectionmath", "#ff00008b", "#ff00008b", "selectionmath" },
 	{ Color_selectiontext, N_("selected text"), "selectiontext", black, black, "selectiontext" },
-	{ Color_preeditfocus, N_("preedit focus background"), "preeditfocus", "#add8e6", "#add8e6", "preeditfocus" },
+	{ Color_preeditfocus, N_("preedit focus background"), "preeditfocus", "#ffadd8e6", "#ffadd8e6", "preeditfocus" },
 	{ Color_preeditfocustext, N_("preedit focus text"), "preeditfocustext", black, black, "preeditfocustext" },
-	{ Color_preeditbg, N_("preedit background"), "preeditbg", Linen, black, "preeditbg" },
+	{ Color_preeditbg, N_("preedit background"), "preeditbg", Transparent, Transparent, "preeditbg" },
 	{ Color_preedittext, N_("preedit text"), "preedittext", black, Linen, "preedittext" },
-	{ Color_latex, N_("LaTeX text"), "latex", DarkRed, "#D66613", "latex" },
+	{ Color_latex, N_("LaTeX text"), "latex", DarkRed, "#ffd66613", "latex" },
 	{ Color_preview, N_("previewed snippet"), "preview", black, Linen, "preview" },
 	{ Color_inlinecompletion, N_("inline completion"),
 		"inlinecompletion", grey60, grey40, "inlinecompletion" },
 	{ Color_nonunique_inlinecompletion, N_("inline completion (non-unique)"),
 		"nonuniqueinlinecompletion", grey80, grey60, "nonuniqueinlinecompletion" },
-	{ Color_notelabel, N_("note label"), "note", yellow, "#FF6200", "note" },
-	{ Color_notebg, N_("note background"), "notebg", yellow, "#5b5903", "notebg" },
+	{ Color_notelabel, N_("note label"), "note", yellow, "#ffff6200", "note" },
+	{ Color_notebg, N_("note background"), "notebg", yellow, "#ff5b5903", "notebg" },
 	{ Color_commentlabel, N_("comment label"), "comment", magenta, olive, "comment" },
 	{ Color_commentbg, N_("comment background"), "commentbg", Linen, black, "commentbg" },
-	{ Color_greyedoutlabel, N_("greyedout inset label"), "greyedout", "#ff0080", "#ff0080", "greyedout" },
+	{ Color_greyedoutlabel, N_("greyedout inset label"), "greyedout", "#ffff0080", "#ffff0080", "greyedout" },
 	{ Color_greyedouttext, N_("greyedout inset text"), "greyedouttext", grey80, grey40, "greyedouttext" },
 	{ Color_greyedoutbg, N_("greyedout inset background"), "greyedoutbg", Linen, black, "greyedoutbg" },
-	{ Color_shadedbg, N_("shaded box"), "shaded", "#ff0000", "#f2af7d", "shaded" },
+	{ Color_shadedbg, N_("shaded box"), "shaded", "#ffff0000", "#fff2af7d", "shaded" },
 	{ Color_listingsbg, N_("listings background"), "listingsbg", white, black, "listingsbg" },
-	{ Color_branchlabel, N_("branch label"), "branchlabel", "#c88000", "#c88000", "branchlabel" },
-	{ Color_footlabel, N_("footnote label"), "footlabel", "#00aaff", blue, "footlabel" },
+	{ Color_branchlabel, N_("branch label"), "branchlabel", "#ffc88000", "#ffc88000", "branchlabel" },
+	{ Color_footlabel, N_("footnote label"), "footlabel", "#ff00aaff", blue, "footlabel" },
 	{ Color_indexlabel, N_("index label"), "indexlabel", Green, teal, "indexlabel" },
-	{ Color_marginlabel, N_("margin note label"), "marginlabel", "#aa55ff", violet, "marginlabel" },
-	{ Color_nomlabel, N_("nomenclature label"), "nomlabel", "#ff6d2f", "#ff6d2f", "nomlabel" },
-	{ Color_phantomtext, N_("phantom inset text"), "phantomtext", "#7f7f7f", "#7f7f7f", "phantomtext" },
+	{ Color_marginlabel, N_("margin note label"), "marginlabel", "#ffaa55ff", violet, "marginlabel" },
+	{ Color_nomlabel, N_("nomenclature label"), "nomlabel", "#ffff6d2f", "#ffff6d2f", "nomlabel" },
+	{ Color_phantomtext, N_("phantom inset text"), "phantomtext", "#ff7f7f7f", "#ff7f7f7f", "phantomtext" },
 	{ Color_urllabel, N_("URL label"), "urllabel", blue, blue, "urllabel" },
-	{ Color_textlabel1, N_("Text label 1"), "textlabel1", blue, "#86a4ff", "textlabel1" },
+	{ Color_textlabel1, N_("Text label 1"), "textlabel1", blue, "#ff86a4ff", "textlabel1" },
 	{ Color_textlabel2, N_("Text label 2"), "textlabel2", Green, green, "textlabel2" },
 	{ Color_textlabel3, N_("Text label 3"), "textlabel3", magenta, magenta, "textlabel3" },
-	{ Color_urltext, N_("URL text"), "urltext", blue, "#86a4ff", "urltext" },
+	{ Color_urltext, N_("URL text"), "urltext", blue, "#ff86a4ff", "urltext" },
 	{ Color_depthbar, N_("depth bar"), "depthbar", IndianRed, IndianRed, "depthbar" },
 	{ Color_scroll, N_("scroll indicator"), "scroll", IndianRed, IndianRed, "scroll" },
-	{ Color_language, N_("language"), "language", blue, "#86a4ff", "language" },
+	{ Color_language, N_("language"), "language", blue, "#ff86a4ff", "language" },
 	{ Color_command, N_("command inset"), "command", black, black, "command" },
-	{ Color_commandbg, N_("command inset background"), "commandbg", "#f0ffff", "#f0ffff", "commandbg" },
+	{ Color_commandbg, N_("command inset background"), "commandbg", "#fff0ffff", "#fff0ffff", "commandbg" },
 	{ Color_commandframe, N_("command inset frame"), "commandframe", black, Linen, "commandframe" },
 	{ Color_special, N_("special character"), "special", RoyalBlue, RoyalBlue, "special" },
-	{ Color_graphicsbg, N_("graphics background"), "graphicsbg", Linen, black, "graphicsbg" },
-	{ Color_math, N_("math text"), "math", "#00008B", "#85F0FE", "math" },
-	{ Color_mathbg, N_("math background"), "mathbg", Linen, black, "mathbg" },
+	{ Color_graphicsbg, N_("graphics background"), "graphicsbg", Transparent, Transparent, "graphicsbg" },
+	{ Color_math, N_("math text"), "math", "#ff00008b", "#ff85f0fe", "math" },
+	{ Color_mathbg, N_("math background"), "mathbg", Transparent, Transparent, "mathbg" },
 	{ Color_mathmacrobg, N_("math macro background"), "mathmacrobg", Linen, black, "mathmacrobg" },
-	{ Color_mathmacrohoverbg, N_("math macro hovered background"), "mathmacrohoverbg", "#cdc3b8",
+	{ Color_mathmacrohoverbg, N_("math macro hovered background"), "mathmacrohoverbg", "#ffcdc3b8",
 		grey80, "mathmacrohoverbg" },
-	{ Color_mathmacrolabel, N_("math macro label"), "mathmacrolabel", "#a19992", "#a19992", "mathmacrolabel" },
-	{ Color_mathmacroframe, N_("math macro frame"), "mathmacroframe", "#ede2d8", black, "mathmacroframe" },
+	{ Color_mathmacrolabel, N_("math macro label"), "mathmacrolabel", "#ffa19992", "#ffa19992", "mathmacrolabel" },
+	{ Color_mathmacroframe, N_("math macro frame"), "mathmacroframe", "#ffede2d8", black, "mathmacroframe" },
 	{ Color_mathmacroblend, N_("math macro blended out"), "mathmacroblend", black, Linen, "mathmacroblend" },
 	{ Color_mathmacrooldarg, N_("math macro old parameter"), "mathmacrooldarg", grey80, grey40, "mathmacrooldarg" },
 	{ Color_mathmacronewarg, N_("math macro new parameter"), "mathmacronewarg", black, Linen, "mathmacronewarg" },
 	{ Color_mathframe, N_("math frame"), "mathframe", magenta, magenta, "mathframe" },
 	{ Color_mathcorners, N_("math corners"), "mathcorners", Linen, black, "mathcorners" },
-	{ Color_mathline, N_("math line"), "mathline", blue, "#86a4ff", "mathline" },
+	{ Color_mathline, N_("math line"), "mathline", blue, "#ff86a4ff", "mathline" },
 	{ Color_collapsible, N_("collapsible inset text"), "collapsible", DarkRed, DarkRed, "collapsible" },
 	{ Color_collapsibleframe, N_("collapsible inset frame"), "collapsibleframe", IndianRed, IndianRed, "collapsibleframe" },
 	{ Color_insetbg, N_("inset background"), "insetbg", grey80, grey80, "insetbg" },
@@ -328,29 +361,29 @@ ColorSet::ColorSet()
 	{ Color_eolmarker, N_("end-of-line marker"), "eolmarker", Brown, Brown, "eolmarker" },
 	{ Color_added_space, N_("added space markers"), "added_space", Brown, Brown, "added_space" },
 	{ Color_appendix, N_("appendix marker"), "appendix", Brown, Brown, "appendix" },
-	{ Color_changebar, N_("change bar"), "changebar", blue, "#86a4ff", "changebar" },
-	{ Color_deletedtext_output, N_("changes - deleted text (exported output)"), "deletedtext", "#ff0000", "#ff0000", "deletedtext" },
-	{ Color_addedtext_output, N_("changes - added text (exported output)"), "addedtext", "#0000ff", "#0000ff", "addedtext" },
-	{ Color_changedtext_workarea_author1, N_("changed text (workarea, 1st author)"), "changedtextauthor1", "#0000ff", "#86a4ff", "changedtextauthor1" },
-	{ Color_changedtext_workarea_author2, N_("changed text (workarea, 2nd author)"), "changedtextauthor2", "#ff00ff", "#ee86ee", "changedtextauthor2" },
-	{ Color_changedtext_workarea_author3, N_("changed text (workarea, 3rd author)"), "changedtextauthor3", "#ff0000", "#ea8989", "changedtextauthor3" },
-	{ Color_changedtext_workarea_author4, N_("changed text (workarea, 4th author)"), "changedtextauthor4", "#aa00ff", "#c371ec", "changedtextauthor4" },
-	{ Color_changedtext_workarea_author5, N_("changed text (workarea, 5th author)"), "changedtextauthor5", "#55aa00", "#acd780", "changedtextauthor5" },
-	{ Color_changedtext_workarea_comparison, N_("changed text (workarea, document comparison)"), "changedtextcomparison", "#008080", "#719FB0", "changedtextcomparison" },
+	{ Color_changebar, N_("change bar"), "changebar", blue, "#ff86a4ff", "changebar" },
+	{ Color_deletedtext_output, N_("changes - deleted text (exported output)"), "deletedtext", "#ffff0000", "#ffff0000", "deletedtext" },
+	{ Color_addedtext_output, N_("changes - added text (exported output)"), "addedtext", "#ff0000ff", "#ff0000ff", "addedtext" },
+	{ Color_changedtext_workarea_author1, N_("changed text (workarea, 1st author)"), "changedtextauthor1", "#ff0000ff", "#ff86a4ff", "changedtextauthor1" },
+	{ Color_changedtext_workarea_author2, N_("changed text (workarea, 2nd author)"), "changedtextauthor2", "#ffff00ff", "#ffee86ee", "changedtextauthor2" },
+	{ Color_changedtext_workarea_author3, N_("changed text (workarea, 3rd author)"), "changedtextauthor3", "#ffff0000", "#ffea8989", "changedtextauthor3" },
+	{ Color_changedtext_workarea_author4, N_("changed text (workarea, 4th author)"), "changedtextauthor4", "#ffaa00ff", "#ffc371ec", "changedtextauthor4" },
+	{ Color_changedtext_workarea_author5, N_("changed text (workarea, 5th author)"), "changedtextauthor5", "#ff55aa00", "#ffacd780", "changedtextauthor5" },
+	{ Color_changedtext_workarea_comparison, N_("changed text (workarea, document comparison)"), "changedtextcomparison", "#ff008080", "#ff719fb0", "changedtextcomparison" },
 	{ Color_deletedtext_workarea_modifier, N_("changes - deleted text brightness (workarea)"), "deletedtextmodifier", white, white, "deletedtextmodifier" },
 	{ Color_tabularline, N_("table line"), "tabularline", black, Linen, "tabularline" },
-	{ Color_tabularonoffline, N_("table on/off line"), "tabularonoffline", "#b0c4de", "#23497b", "tabularonoffline" },
+	{ Color_tabularonoffline, N_("table on/off line"), "tabularonoffline", "#ffb0c4de", "#ff23497b", "tabularonoffline" },
 	{ Color_bottomarea, N_("bottom area"), "bottomarea", grey40, grey80, "bottomarea" },
-	{ Color_newpage, N_("new page"), "newpage", blue, "#86a4ff", "newpage" },
+	{ Color_newpage, N_("new page"), "newpage", blue, "#ff86a4ff", "newpage" },
 	{ Color_pagebreak, N_("page break / line break"), "pagebreak", RoyalBlue, RoyalBlue, "pagebreak" },
-	{ Color_buttonframe, N_("button frame"), "buttonframe", "#dcd2c8", "#dcd2c8", "buttonframe" },
-	{ Color_buttonbg, N_("button background"), "buttonbg", "#dcd2c8", "#dcd2c8", "buttonbg" },
-	{ Color_buttonhoverbg, N_("button background under focus"), "buttonhoverbg", "#C7C7CA", "#C7C7CA", "buttonhoverbg" },
+	{ Color_buttonframe, N_("button frame"), "buttonframe", "#ffdcd2c8", "#ffdcd2c8", "buttonframe" },
+	{ Color_buttonbg, N_("button background"), "buttonbg", "#ffdcd2c8", "#ffdcd2c8", "buttonbg" },
+	{ Color_buttonhoverbg, N_("button background under focus"), "buttonhoverbg", "#ffc7c7ca", "#ffc7c7ca", "buttonhoverbg" },
 	{ Color_command_broken, N_("command inset (broken reference)"), "command", white, white, "command_broken" },
 	{ Color_buttonbg_broken, N_("button background (broken reference)"), "commandbg", red, red, "commandbg_broken" },
 	{ Color_buttonframe_broken, N_("button frame (broken reference)"), "commandframe", red, red, "commandframe_broken" },
 	{ Color_buttonhoverbg_broken, N_("button background (broken reference) under focus"),
-		"buttonhoverbg", "#DB0B0B", "#DB0B0B", "buttonhoverbg_broken" },
+		"buttonhoverbg", "#ffdb0b0b", "#ffdb0b0b", "buttonhoverbg_broken" },
 	{ Color_paragraphmarker, N_("paragraph marker"), "paragraphmarker", grey80, grey40, "paragraphmarker"},
 	{ Color_previewframe, N_("preview frame"), "previewframe", black, Linen, "previewframe"},
 	{ Color_bookmark, N_("bookmark"), "bookmark", RoyalBlue, RoyalBlue, "bookmark" },
@@ -371,8 +404,8 @@ void ColorSet::fill(ColorEntry const & entry)
 	Information in;
 	in.lyxname   = entry.lyxname;
 	in.latexname = entry.latexname;
-	in.x11hexname   = entry.x11hexname;
-	in.x11darkhexname   = entry.x11darkhexname;
+	in.hex32name   = entry.hex32name;
+	in.darkhex32name   = entry.darkhex32name;
 	in.guiname   = entry.guiname;
 	infotab[entry.lcolor] = in;
 	lyxcolors[entry.lyxname] = entry.lcolor;
@@ -393,7 +426,8 @@ string const ColorSet::getX11HexName(ColorCode c, bool const darkmode) const
 {
 	InfoTab::const_iterator it = infotab.find(c);
 	if (it != infotab.end())
-		return darkmode ? it->second.x11darkhexname : it->second.x11hexname;
+		return darkmode ? "#" + it->second.darkhex32name.substr(3, 6) :
+		                  "#" + it->second.hex32name.substr(3, 6);
 
 	lyxerr << "LyX internal error: Missing color"
 		  " entry in Color.cpp for " << c << '\n'
@@ -412,7 +446,8 @@ pair<string, string> const ColorSet::getAllX11HexNames(ColorCode c) const
 {
 	InfoTab::const_iterator it = infotab.find(c);
 	if (it != infotab.end())
-		return make_pair(it->second.x11hexname, it->second.x11darkhexname);
+		return make_pair("#" + it->second.hex32name.substr(3, 6),
+		                 "#" + it->second.darkhex32name.substr(3, 6));
 
 	lyxerr << "LyX internal error: Missing color"
 		  " entry in Color.cpp for " << c << '\n'
@@ -421,6 +456,38 @@ pair<string, string> const ColorSet::getAllX11HexNames(ColorCode c) const
 }
 
 
+string const ColorSet::get32bitHexName(ColorCode c, bool const darkmode) const
+{
+	InfoTab::const_iterator it = infotab.find(c);
+	if (it != infotab.end())
+		return darkmode ? it->second.darkhex32name : it->second.hex32name;
+
+	lyxerr << "LyX internal error: Missing color"
+		  " entry in Color.cpp for " << c << '\n'
+	       << "Using black." << endl;
+	return darkmode ? "#fffaf0e6" : "black";
+}
+
+
+string const ColorSet::get32bitHexName(string const & lyxname, bool const darkmode) const
+{
+	return getX11HexName(getFromLyXName(lyxname), darkmode);
+}
+
+
+pair<string, string> const ColorSet::getAll32bitHexNames(ColorCode c) const
+{
+	InfoTab::const_iterator it = infotab.find(c);
+	if (it != infotab.end())
+		return make_pair(it->second.hex32name, it->second.darkhex32name);
+
+	lyxerr << "LyX internal error: Missing color"
+		  " entry in Color.cpp for " << c << '\n'
+	       << "Using black." << endl;
+	return make_pair("black", "#fffaf0e6");
+}
+
+
 string const ColorSet::getLaTeXName(ColorCode c) const
 {
 	InfoTab::const_iterator it = infotab.find(c);
@@ -439,8 +506,8 @@ string const ColorSet::getLyXName(ColorCode c) const
 }
 
 
-bool ColorSet::setColor(ColorCode col, string const & x11hexname,
-			string const & x11darkhexname)
+bool ColorSet::setColor(ColorCode col, string const & hexname,
+			string const & darkhexname)
 {
 	InfoTab::iterator it = infotab.find(col);
 	if (it == infotab.end()) {
@@ -455,15 +522,30 @@ bool ColorSet::setColor(ColorCode col, string const & x11hexname,
 		return false;
 	}
 
-	if (!x11hexname.empty())
-		it->second.x11hexname = x11hexname;
-	it->second.x11darkhexname = (x11darkhexname.empty()) ? x11hexname : x11darkhexname;
+	LASSERT((hexname.empty()
+	         || ((hexname.size() == 7 || hexname.size() == 9)
+	             && hexname[0] == '#'))
+	        && (darkhexname.empty()
+	            || ((darkhexname.size() == 7 || darkhexname.size() == 9)
+	                && darkhexname[0] == '#')),
+	        return true);
+
+	if (!hexname.empty())
+		it->second.hex32name = hexname.size() == 7 ?
+		            "#ff" + hexname.substr(1, 6) : hexname;
+
+	if (!darkhexname.empty())
+		it->second.darkhex32name = darkhexname.size() == 7 ?
+		            "#ff" + darkhexname.substr(1, 6) : darkhexname;
+	else
+		it->second.darkhex32name = hexname.size() == 7 ?
+		            "#ff" + hexname.substr(1, 6) : hexname;
 	return true;
 }
 
 
-bool ColorSet::setColor(string const & lyxname, string const & x11hexname,
-			string const & x11darkhexname)
+bool ColorSet::setColor(string const & lyxname, string const & hexname,
+			string const & darkhexname)
 {
 	string const lcname = ascii_lowercase(lyxname);
 	if (lyxcolors.find(lcname) == lyxcolors.end()) {
@@ -472,7 +554,7 @@ bool ColorSet::setColor(string const & lyxname, string const & x11hexname,
 		addColor(static_cast<ColorCode>(infotab.size()), lcname);
 	}
 
-	return setColor(lyxcolors[lcname], x11hexname, x11darkhexname);
+	return setColor(lyxcolors[lcname], hexname, darkhexname);
 }
 
 
@@ -595,5 +677,4 @@ ColorSet lcolor;
 // An equally evil global system Color instance
 ColorSet system_lcolor;
 
-
 } // namespace lyx
diff --git a/src/Color.h b/src/Color.h
index e85efbfbae..8ba9587831 100644
--- a/src/Color.h
+++ b/src/Color.h
@@ -60,7 +60,12 @@ public:
 std::ostream & operator<<(std::ostream & os, Color color);
 
 std::string const X11hexname(RGBColor const & col);
-RGBColor rgbFromHexName(std::string const & x11hexname);
+/// Returns RGBColor from 16- or 32-bit hex name
+/// Alpha value is omitted for 32-bit hex name
+RGBColor rgbFromHexName(std::string const & hexname);
+/// Returns ARGBColor from 16- or 32-bit hex name
+/// 16-bit hex name is interpreted as a solid color
+ARGBColor argbFromHexName(std::string const & hexname);
 std::string const outputLaTeXColor(RGBColor const & color);
 /// Inverse of outputLaTeXColor
 RGBColor const RGBColorFromLaTeX(std::string const & color);
diff --git a/src/ColorCode.h b/src/ColorCode.h
index 1cd7e61c1c..3492498746 100644
--- a/src/ColorCode.h
+++ b/src/ColorCode.h
@@ -272,6 +272,14 @@ struct RGBColor {
 		: r(red), g(green), b(blue) {}
 };
 
+struct ARGBColor : public RGBColor {
+	unsigned int a;
+	ARGBColor() : RGBColor(), a(255) {}
+	ARGBColor(unsigned int red, unsigned int green, unsigned int blue,
+	          unsigned int alpha = 255)
+		: RGBColor(red, green, blue), a(alpha) {}
+};
+
 inline bool operator==(RGBColor const & c1, RGBColor const & c2)
 {
 	return (c1.r == c2.r && c1.g == c2.g && c1.b == c2.b);
@@ -283,6 +291,18 @@ inline bool operator!=(RGBColor const & c1, RGBColor const & c2)
 	return !(c1 == c2);
 }
 
+
+inline bool operator==(ARGBColor const & c1, ARGBColor const & c2)
+{
+	return (c1.r == c2.r && c1.g == c2.g && c1.b == c2.b && c1.a == c2.a);
+}
+
+
+inline bool operator!=(ARGBColor const & c1, ARGBColor const & c2)
+{
+	return !(c1 == c2);
+}
+
 } // namespace lyx
 
 #endif
diff --git a/src/ColorSet.h b/src/ColorSet.h
index c9dbaa3da2..78e3f2a08e 100644
--- a/src/ColorSet.h
+++ b/src/ColorSet.h
@@ -52,16 +52,16 @@ public:
 	 *  \returns true if successful. The optional third argument passes
 	 *  a color for dark mode.
 	 */
-	bool setColor(ColorCode col, std::string const & x11hexname,
-		      std::string const & x11darkhexname = std::string());
+	bool setColor(ColorCode col, std::string const & hexname,
+		      std::string const & darkhexname = std::string());
 
 	/** set the given LyX color to the color defined by the X11
 	 *  hex name given \returns true if successful. A new color entry
 	 *  is created if the color is unknown. The optional third argument passes
 	 *  a color for dark mode.
 	 */
-	bool setColor(std::string const & lyxname, std::string const & x11hexname,
-		      std::string const & x11darkhexname = std::string());
+	bool setColor(std::string const & lyxname, std::string const & hexname,
+		      std::string const & darkhexname = std::string());
 
 	/** set the given LyX color to a latexcolor if not yet defined
 	 *  \returns true if successful. A new color entry
@@ -87,6 +87,16 @@ public:
 	/// Get the X11 hexname of \c color.
 	std::pair<std::string, std::string> const getAllX11HexNames(ColorCode c) const;
 
+	/// Get the 32bit hexname of \c color.
+	std::string const get32bitHexName(ColorCode c, bool const darkmode = false) const;
+
+	/// Get the 32bit hexname of \c color.
+	std::string const get32bitHexName(std::string const & lyxname,
+					bool const darkmode = false) const;
+
+	/// Get the 32bit hexname of \c color.
+	std::pair<std::string, std::string> const getAll32bitHexNames(ColorCode c) const;
+
 	/// Get the LaTeX name of \c color.
 	std::string const getLaTeXName(ColorCode c) const;
 
@@ -115,10 +125,10 @@ private:
 		std::string guiname;
 		/// the name used in LaTeX
 		std::string latexname;
-		/// the name for X11
-		std::string x11hexname;
-		/// matching X11 color for dark mode
-		std::string x11darkhexname;
+		/// the 32bit hex name
+		std::string hex32name;
+		/// matching 32bit color for dark mode
+		std::string darkhex32name;
 		/// the name for LyX
 		std::string lyxname;
 	};
diff --git a/src/LyXRC.cpp b/src/LyXRC.cpp
index b26b948139..6ab8044b64 100644
--- a/src/LyXRC.cpp
+++ b/src/LyXRC.cpp
@@ -2108,11 +2108,11 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c
 	case RC_SET_COLOR:
 		for (int i = 0; i < Color_ignore; ++i) {
 			ColorCode lc = static_cast<ColorCode>(i);
-			string const col = lcolor.getAllX11HexNames(lc).first;
-			string const darkcol = lcolor.getAllX11HexNames(lc).second;
+			string const col = lcolor.getAll32bitHexNames(lc).first;
+			string const darkcol = lcolor.getAll32bitHexNames(lc).second;
 			if (ignore_system_lyxrc
-			    || col != system_lcolor.getAllX11HexNames(lc).first
-			    || darkcol != system_lcolor.getAllX11HexNames(lc).second) {
+			    || col != system_lcolor.getAll32bitHexNames(lc).first
+			    || darkcol != system_lcolor.getAll32bitHexNames(lc).second) {
 				os << "\\set_color \""
 				   << lcolor.getLyXName(lc) << "\" \""
 				   << col << "\" \""
diff --git a/src/frontends/qt/ColorCache.cpp b/src/frontends/qt/ColorCache.cpp
index ec0676d79b..210f5c68c4 100644
--- a/src/frontends/qt/ColorCache.cpp
+++ b/src/frontends/qt/ColorCache.cpp
@@ -71,10 +71,10 @@ void ColorCache::init()
 	for (int col = 0; col <= Color_ignore; ++col) {
 		// light-mode color
 		lcolors_[col].first =
-		    QColor(lcolor.getX11HexName(ColorCode(col), false).c_str());
+		    QColor(lcolor.get32bitHexName(ColorCode(col), false).c_str());
 		// dark-mode color
 		lcolors_[col].second =
-		     QColor(lcolor.getX11HexName(ColorCode(col), true).c_str());
+		     QColor(lcolor.get32bitHexName(ColorCode(col), true).c_str());
 	}
 
 	initialized_ = true;
@@ -134,8 +134,8 @@ ColorPair ColorCache::getAll(Color const & color, bool syscolors) const
 		};
 	}
 	// used by branches
-	return {QColor(lcolor.getX11HexName(color.baseColor, false).c_str()),
-		QColor(lcolor.getX11HexName(color.baseColor, true).c_str())};
+	return {QColor(lcolor.get32bitHexName(color.baseColor, false).c_str()),
+		QColor(lcolor.get32bitHexName(color.baseColor, true).c_str())};
 }
 
 
diff --git a/src/frontends/qt/GuiDialog.cpp b/src/frontends/qt/GuiDialog.cpp
index c52bbb4d9c..af6ebc31d6 100644
--- a/src/frontends/qt/GuiDialog.cpp
+++ b/src/frontends/qt/GuiDialog.cpp
@@ -286,9 +286,11 @@ QString GuiDialog::browseRelToSub(
 }
 
 
-QColor GuiDialog::getColor(const QColor &initial, QWidget *parent)
+QColor GuiDialog::getColor(const QColor &initial, QWidget *parent,
+                           QString const & title,
+                           QColorDialog::ColorDialogOptions options)
 {
-	const QColor color = QColorDialog::getColor(initial, parent);
+	const QColor color = QColorDialog::getColor(initial, parent, title, options);
 	if (guiApp->platformName() == "cocoa") {
 		QWidget * dialog = parent->window();
 		// On Mac explicitly activate the parents top-level widget
@@ -299,9 +301,10 @@ QColor GuiDialog::getColor(const QColor &initial, QWidget *parent)
 	return color;
 }
 
-QColor GuiDialog::getColor(const QColor &initial)
+QColor GuiDialog::getColor(const QColor &initial, QString const & title,
+                           QColorDialog::ColorDialogOptions options)
 {
-	return getColor(initial, asQWidget());
+	return getColor(initial, asQWidget(), title, options);
 }
 
 } // namespace frontend
diff --git a/src/frontends/qt/GuiDialog.h b/src/frontends/qt/GuiDialog.h
index f2a7efe727..016fca19a9 100644
--- a/src/frontends/qt/GuiDialog.h
+++ b/src/frontends/qt/GuiDialog.h
@@ -16,6 +16,7 @@
 #include "ButtonController.h"
 
 #include <QAbstractButton>
+#include <QColorDialog>
 #include <QDialog>
 
 
@@ -179,8 +180,13 @@ public:
 		QString const & label2 = QString(),
 		QString const & dir2 = QString());
 
-	static QColor getColor(const QColor &initial, QWidget *parent);
-	QColor getColor(const QColor &initial);
+	static QColor getColor(const QColor &initial, QWidget *parent,
+	                       QString const & title = QString(),
+	                       QColorDialog::ColorDialogOptions options
+	                       = QColorDialog::ColorDialogOptions());
+	QColor getColor(const QColor &initial, QString const & title = QString(),
+	                QColorDialog::ColorDialogOptions options
+	                = QColorDialog::ColorDialogOptions());
 
 private:
 	ButtonController bc_;
diff --git a/src/frontends/qt/GuiPrefs.cpp b/src/frontends/qt/GuiPrefs.cpp
index 1290556215..29aa070489 100644
--- a/src/frontends/qt/GuiPrefs.cpp
+++ b/src/frontends/qt/GuiPrefs.cpp
@@ -1112,9 +1112,9 @@ void PrefColors::updateRC(LyXRC const & rc)
 		ColorPair colors =
 		        guiApp->colorCache().getAll(lcolors_[i], false);
 		theme_colors_[i].first  = newcolors_[i].first
-		        = curcolors_[i].first  = colors.first.name();
+		        = curcolors_[i].first  = colors.first.name(QColor::HexArgb);
 		theme_colors_[i].second = newcolors_[i].second
-		        = curcolors_[i].second = colors.second.name();
+		        = curcolors_[i].second = colors.second.name(QColor::HexArgb);
 		setSwatches(i, colors);
 	}
 
@@ -1187,13 +1187,14 @@ void PrefColors::changeColor(int const &row, bool const &is_dark_mode)
 	else
 		color = newcolors_[size_t(row)].first;
 
-	QColor const c = form_->getColor(QColor(color));
+	QColor const c = form_->getColor(QColor(color), QString(),
+	                                 QColorDialog::ShowAlphaChannel);
 
 	if (setColor(colorsTV_model_.item(row, is_dark_mode), c, color)) {
 		if (is_dark_mode)
-			newcolors_[size_t(row)].second = c.name();
+			newcolors_[size_t(row)].second = c.name(QColor::HexArgb);
 		else
-			newcolors_[size_t(row)].first  = c.name();
+			newcolors_[size_t(row)].first  = c.name(QColor::HexArgb);
 		findThemeFromColorSet();
 		// emit signal
 		changed();
@@ -1332,7 +1333,7 @@ bool PrefColors::resetAllColor()
 bool PrefColors::setColor(QStandardItem *pitem,
                           QColor const &new_color, QString const &old_color)
 {
-	if (new_color.isValid() && new_color.name() != old_color) {
+	if (new_color.isValid() && new_color.name(QColor::HexArgb) != old_color) {
 		QUndoCommand* setColorCmd =
 		        new SetColor(pitem, new_color, old_color, newcolors_,
 		                     autoapply_, this);
@@ -1623,8 +1624,8 @@ ColorNamePairs PrefColors::readTheme(FileName const & fullpath, LyXRC & rc) cons
 	for (size_type row = 0; row < lcolors_.size(); ++row) {
 		// get colors from extern lcolor
 		colors[size_t(row)] =
-		    {getCurrentColor(lcolors_[row], false).name(),
-		     getCurrentColor(lcolors_[row], true).name()};
+		    {getCurrentColor(lcolors_[row], false).name(QColor::HexArgb),
+		     getCurrentColor(lcolors_[row], true).name(QColor::HexArgb)};
 	}
 	return colors;
 }
@@ -1931,7 +1932,7 @@ void PrefColors::initializeColorsTV()
 
 QColor PrefColors::getCurrentColor(ColorCode color_code, bool const is_dark_mode) const
 {
-	return lcolor.getX11HexName(color_code, is_dark_mode).c_str();
+	return lcolor.get32bitHexName(color_code, is_dark_mode).c_str();
 }
 
 
@@ -2010,10 +2011,10 @@ void PrefColors::filterByColor(const QColor &color)
 {
 	QList<QStandardItem *>rows_found;
 	for (int i=0; i<colorsTV_model_.rowCount(); ++i) {
-		if (colorsTV_model_.item(i, 0)->data(Qt::DecorationRole).value<QColor>().name()
-		        == color.name() ||
-		        colorsTV_model_.item(i, 1)->data(Qt::DecorationRole).value<QColor>().name()
-		        == color.name()) {
+		if (colorsTV_model_.item(i, 0)->data(Qt::DecorationRole).value<QColor>().name(QColor::HexArgb)
+		        == color.name(QColor::HexArgb) ||
+		        colorsTV_model_.item(i, 1)->data(Qt::DecorationRole).value<QColor>().name(QColor::HexArgb)
+		        == color.name(QColor::HexArgb)) {
 			rows_found.push_back(colorsTV_model_.item(i));
 		}
 	}
@@ -2060,7 +2061,8 @@ void PrefColors::openColorChooser()
 	}
 
 	// open color dialog
-	QColor color = cdlg.getColor(initial_color, form_);
+	QColor color = cdlg.getColor(initial_color, form_, QString(),
+	                             QColorDialog::ShowAlphaChannel);
 
 	form_->raise();
 
@@ -4691,9 +4693,9 @@ void SetColor::undo()
 void SetColor::setColor(QColor const &color)
 {
 	if (item_.column() == 1)
-		newcolors_[size_t(item_.row())].second = color.name();
+		newcolors_[size_t(item_.row())].second = color.name(QColor::HexArgb);
 	else
-		newcolors_[size_t(item_.row())].first = color.name();
+		newcolors_[size_t(item_.row())].first = color.name(QColor::HexArgb);
 	setSwatch(&item_, color);
 
 	parent_->form_->update();
@@ -4718,6 +4720,26 @@ ColorSwatchDelegate::ColorSwatchDelegate(QObject *parent)
     : QStyledItemDelegate(parent), button_(new QPushButton)
 {
 	pane_ = static_cast<PrefColors*>(parent);
+
+	// construct the background image of swatches
+	bg_pixmap_ = new QPixmap(pane_->swatch_width_, pane_->swatch_height_);
+	bg_pixmap_->fill(Qt::white);
+	QPainter painter(bg_pixmap_);
+	painter.setRenderHint(QPainter::Antialiasing);
+	QPolygon polygon;
+	polygon << QPoint(pane_->swatch_width_, 0)
+	        << QPoint(0, pane_->swatch_height_)
+	        << QPoint(0, 0);
+	painter.setPen(QColor(Qt::black));
+	painter.setBrush(QColor(Qt::black));
+	painter.drawPolygon(polygon);
+	painter.end();
+}
+
+
+ColorSwatchDelegate::~ColorSwatchDelegate()
+{
+	delete bg_pixmap_;
 }
 
 
@@ -4741,9 +4763,10 @@ void ColorSwatchDelegate::paint(QPainter *painter,
 		QColor color =
 		        pane_->colorsTV_model_.data(index, Qt::DecorationRole).
 		        value<QColor>();
-		if (index.flags().testFlag(Qt::ItemIsEnabled))
+		if (index.flags().testFlag(Qt::ItemIsEnabled)) {
 			pixmap.fill(color);
-		else
+			pixmap = mergePixmaps(&pixmap, bg_pixmap_);
+		} else
 			pixmap.fill(Qt::transparent);
 		style->drawItemPixmap(painter, opt.rect, Qt::AlignCenter, pixmap);
 	} else {
@@ -4753,6 +4776,16 @@ void ColorSwatchDelegate::paint(QPainter *painter,
 }
 
 
+QPixmap ColorSwatchDelegate::mergePixmaps(QPixmap const *fg, QPixmap const *bg) const
+{
+	// make a copy to leave bg untouched
+	QPixmap merged(*bg);
+	QPainter painter(&merged);
+	painter.drawPixmap(0, 0, *bg);
+	painter.drawPixmap(0, 0, *fg);
+	return merged;
+}
+
 } // namespace frontend
 } // namespace lyx
 
diff --git a/src/frontends/qt/GuiPrefs.h b/src/frontends/qt/GuiPrefs.h
index ab67f69ebc..441adc81c3 100644
--- a/src/frontends/qt/GuiPrefs.h
+++ b/src/frontends/qt/GuiPrefs.h
@@ -735,12 +735,15 @@ class ColorSwatchDelegate : public QStyledItemDelegate
 
 public:
 	ColorSwatchDelegate(QObject *parent = nullptr);
+	~ColorSwatchDelegate();
 
 	void paint(QPainter *painter, const QStyleOptionViewItem &option,
 	           const QModelIndex &index) const override;
 
 private:
+	QPixmap mergePixmaps(QPixmap const * fg, QPixmap const * bg) const;
 	PrefColors* pane_;
+	QPixmap* bg_pixmap_;
 	QFont font_;
 
 	// To give impression that a button is pressed, flip the direction of
