mirror of
https://codeberg.org/vyn/selenite.git
synced 2025-07-02 01:23:23 +00:00
Add Green, Orange and Red colors
This commit is contained in:
parent
00857b287f
commit
9a75d946f8
2 changed files with 8 additions and 1 deletions
|
@ -20,6 +20,9 @@ struct Palette {
|
||||||
Color pane;
|
Color pane;
|
||||||
Color foreground;
|
Color foreground;
|
||||||
Color foregroundHint;
|
Color foregroundHint;
|
||||||
|
Color green;
|
||||||
|
Color orange;
|
||||||
|
Color red;
|
||||||
};
|
};
|
||||||
|
|
||||||
std::optional<Palette> parseJson(const std::string &path);
|
std::optional<Palette> parseJson(const std::string &path);
|
||||||
|
|
|
@ -30,7 +30,8 @@ std::optional<Palette> parseJson(const std::string &path)
|
||||||
!json["background"].is_string() || !json["background2"].is_string() ||
|
!json["background"].is_string() || !json["background2"].is_string() ||
|
||||||
!json["background4"].is_string() || !json["background3"].is_string() ||
|
!json["background4"].is_string() || !json["background3"].is_string() ||
|
||||||
!json["pane"].is_string() || !json["foreground"].is_string() ||
|
!json["pane"].is_string() || !json["foreground"].is_string() ||
|
||||||
!json["foregroundHint"].is_string()) {
|
!json["foregroundHint"].is_string() || !json["green"].is_string() ||
|
||||||
|
!json["orange"].is_string() || !json["red"].is_string()) {
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,6 +45,9 @@ std::optional<Palette> parseJson(const std::string &path)
|
||||||
.pane = hexStringToColor(json["pane"].get<std::string>()),
|
.pane = hexStringToColor(json["pane"].get<std::string>()),
|
||||||
.foreground = hexStringToColor(json["foreground"].get<std::string>()),
|
.foreground = hexStringToColor(json["foreground"].get<std::string>()),
|
||||||
.foregroundHint = hexStringToColor(json["foregroundHint"].get<std::string>()),
|
.foregroundHint = hexStringToColor(json["foregroundHint"].get<std::string>()),
|
||||||
|
.green = hexStringToColor(json["green"].get<std::string>()),
|
||||||
|
.orange = hexStringToColor(json["orange"].get<std::string>()),
|
||||||
|
.red = hexStringToColor(json["red"].get<std::string>()),
|
||||||
};
|
};
|
||||||
return palette;
|
return palette;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue