Don't swap red and blue channels of theme colors

Fixes #18
This commit is contained in:
Leroy Hopson 2020-11-29 11:49:09 +07:00 committed by Leroy Hopson
parent 6a626905d6
commit 8b25be74c0
2 changed files with 4 additions and 4 deletions

View file

@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
### Fixed ### Fixed
- Don't swap red and blue channels of theme colors.
- Use "Light Cyan" color from theme. Previously ignored. - Use "Light Cyan" color from theme. Previously ignored.

View file

@ -372,11 +372,10 @@ void Terminal::update_color_palette()
// be used in a tsm color palette. // be used in a tsm color palette.
auto set_pallete_color = [this](tsm_vte_color color, String theme_color) -> void { auto set_pallete_color = [this](tsm_vte_color color, String theme_color) -> void {
Color c = get_color(theme_color, "Terminal"); Color c = get_color(theme_color, "Terminal");
uint32_t argb32 = c.to_ARGB32();
color_palette[color][0] = (argb32 >> (8 * 0)) & 0xff; color_palette[color][0] = c.get_r8();
color_palette[color][1] = (argb32 >> (8 * 1)) & 0xff; color_palette[color][1] = c.get_g8();
color_palette[color][2] = (argb32 >> (8 * 2)) & 0xff; color_palette[color][2] = c.get_b8();
}; };
set_pallete_color(TSM_COLOR_BLACK, "Black"); set_pallete_color(TSM_COLOR_BLACK, "Black");