{ config
, pkgs
, ...
}:
{
  home.packages = with pkgs; [
    telegram-desktop
  ];

  home.file.".config/telegram/colors.tdesktop-theme".text = with config.palette; ''
dark: true;
crust: ${base04.hexT}e6;
mantle: ${base04.hexT};
base: ${base06.hexT};
surface0: ${base05.hexT};
surface1: ${base07.hexT};
surface2: ${base03.hexT};
overlay0: ${base01.hexT}bf;
overlay1: ${base01.hexT}cc;
overlay2: ${base01.hexT}d9;
subtext0: ${base01.hexT}f2;
subtext1: ${base01.hexT};
text: ${base02.hexT};
tlavender: ${base01.hexT};
tblue: ${base17.hexT};
tsapphire: ${base02.hexT}f2;
tsky: ${base02.hexT};
tteal: ${base14.hexT};
tgreen: ${base11.hexT};
tyellow: ${base0E.hexT};
tpeach: ${base0C.hexT};
tmaroon: ${base0B.hexT};
tred: ${base08.hexT};
tmauve: ${base1D.hexT};
tpink: ${base0B.hexT}f2;
tflamingo: ${base0B.hexT};
trosewater: ${base02.hexT};
windowBg: base;
windowFg: text;
windowBgOver: mantle;
windowBgRipple: surface2;
windowFgOver: windowFg;
windowSubTextFg: overlay1;
windowSubTextFgOver: overlay1;
windowBoldFg: text;
windowBoldFgOver: tlavender;
windowBgActive: tlavender;
windowFgActive: mantle;
windowActiveTextFg: tlavender;
windowShadowFg: mantle;
windowShadowFgFallback: mantle;
shadowFg: mantle;
slideFadeOutBg: mantle;
slideFadeOutShadowFg: windowShadowFg;
imageBg: mantle;
imageBgTransparent: surface1;
activeButtonBg: windowBgActive;
activeButtonBgOver: tlavender;
activeButtonBgRipple: windowBgRipple;
activeButtonFg: mantle;
activeButtonFgOver: base;
activeButtonSecondaryFg: activeButtonFg;
activeButtonSecondaryFgOver: activeButtonSecondaryFg;
activeLineFg: tlavender;
activeLineFgError: tred;
lightButtonBg: windowBg;
lightButtonBgOver: tlavender;
lightButtonBgRipple: tpink;
lightButtonFg: tlavender;
lightButtonFgOver: mantle;
attentionButtonFg: tred;
attentionButtonFgOver: lightButtonFgOver;
attentionButtonBgOver: tred;
attentionButtonBgRipple: tmaroon;
menuBg: windowBg;
menuBgOver: windowBgOver;
menuBgRipple: windowBgRipple;
menuIconFg: overlay2;
menuIconFgOver: tlavender;
menuSubmenuArrowFg: overlay2;
menuFgDisabled: surface1;
menuSeparatorFg: overlay2;
scrollBarBg: tlavender;
scrollBarBgOver: tlavender;
scrollBg: mantle;
scrollBgOver: mantle;
smallCloseIconFg: overlay2;
smallCloseIconFgOver: tred;
radialFg: windowFgActive;
radialBg: mantle;
placeholderFg: scrollBarBgOver;
placeholderFgActive: tlavender;
inputBorderFg: tlavender;
filterInputBorderFg: tlavender;
filterInputActiveBg: windowBg;
filterInputInactiveBg: windowBgOver;
checkboxFg: overlay1;
botKbBg: menuBgOver;
botKbDownBg: menuBgRipple;
botKbColor: windowBoldFgOver;
sliderBgInactive: checkboxFg;
sliderBgActive: windowBgActive;
tooltipBg: tlavender;
tooltipFg: mantle;
tooltipBorderFg: tlavender;
titleShadow: windowBgOver;
titleBg: windowBgOver;
titleBgActive: titleBg;
titleButtonBg: titleBg;
titleButtonFg: ${base02.hexT};
titleButtonBgOver: titleButtonFg;
titleButtonFgOver: windowBg;
titleButtonBgActive: titleButtonBg;
titleButtonFgActive: titleButtonFg;
titleButtonBgActiveOver: titleButtonBgOver;
titleButtonFgActiveOver: titleButtonFgOver;
titleButtonCloseBg: titleButtonBg;
titleButtonCloseFg: titleButtonFg;
titleButtonCloseBgOver: tred;
titleButtonCloseFgOver: windowFgActive;
titleButtonCloseBgActive: titleButtonCloseBg;
titleButtonCloseFgActive: titleButtonCloseFg;
titleButtonCloseBgActiveOver: titleButtonCloseBgOver;
titleButtonCloseFgActiveOver: titleButtonCloseFgOver;
titleFg: overlay1;
titleFgActive: titleFg;
trayCounterBg: tred;
trayCounterBgMute: overlay2;
trayCounterFg: mantle;
trayCounterBgMacInvert: mantle;
trayCounterFgMacInvert: text;
layerBg: mantleEE;
cancelIconFg: menuIconFg;
cancelIconFgOver: menuIconFgOver;
boxBg: windowBg;
boxTextFg: windowFg;
boxTextFgGood: tgreen;
boxTextFgError: tpeach;
boxTitleFg: tlavender;
boxSearchBg: boxBg;
boxTitleAdditionalFg: overlay1;
boxTitleCloseFg: cancelIconFg;
boxTitleCloseFgOver: cancelIconFgOver;
membersAboutLimitFg: windowSubTextFgOver;
contactsBg: windowBg;
contactsBgOver: windowBgOver;
contactsNameFg: boxTextFg;
contactsStatusFg: windowSubTextFg;
contactsStatusFgOver: windowSubTextFgOver;
contactsStatusFgOnline: windowActiveTextFg;
photoCropFadeBg: layerBg;
photoCropPointFg: text7F;
callArrowFg: boxTextFgGood;
callArrowMissedFg: boxTextFgError;
introBg: windowBg;
introTitleFg: windowBoldFg;
introDescriptionFg: windowSubTextFg;
introErrorFg: windowSubTextFg;
introCoverTopBg: tblue;
introCoverBottomBg: ${base17.hexT};
introCoverIconsFg: ${base17.hexT};
introCoverPlaneTrace: ${base17.hexT}69;
introCoverPlaneInner: subtext1;
introCoverPlaneOuter: subtext0;
introCoverPlaneTop: text;
dialogsMenuIconFg: menuIconFg;
dialogsMenuIconFgOver: menuIconFgOver;
dialogsBg: windowBg;
dialogsNameFg: windowBoldFg;
dialogsChatIconFg: dialogsNameFg;
dialogsDateFg: windowSubTextFg;
dialogsTextFg: windowSubTextFg;
dialogsTextFgService: windowActiveTextFg;
dialogsDraftFg: tgreen;
dialogsVerifiedIconBg: windowBgActive;
dialogsVerifiedIconFg: windowFgActive;
dialogsSendingIconFg: overlay2;
dialogsSentIconFg: tlavender;
dialogsUnreadBg: windowBgActive;
dialogsUnreadBgMuted: overlay2;
dialogsUnreadFg: mantle;
dialogsArchiveFg: tlavender;
dialogsOnlineBadgeFg: tgreen;
dialogsScamFg: dialogsDraftFg;
dialogsBgOver: windowBgOver;
dialogsNameFgOver: windowBoldFgOver;
dialogsChatIconFgOver: dialogsNameFgOver;
dialogsDateFgOver: windowSubTextFgOver;
dialogsTextFgOver: windowSubTextFgOver;
dialogsTextFgServiceOver: dialogsTextFgService;
dialogsDraftFgOver: dialogsDraftFg;
dialogsVerifiedIconBgOver: dialogsVerifiedIconBg;
dialogsVerifiedIconFgOver: dialogsVerifiedIconFg;
dialogsSendingIconFgOver: dialogsSendingIconFg;
dialogsSentIconFgOver: dialogsSentIconFg;
dialogsUnreadBgOver: dialogsUnreadBg;
dialogsUnreadBgMutedOver: dialogsUnreadBgMuted;
dialogsUnreadFgOver: dialogsUnreadFg;
dialogsArchiveFgOver: overlay2;
dialogsScamFgOver: dialogsDraftFgOver;
dialogsBgActive: mantle;
dialogsNameFgActive: tlavender;
dialogsChatIconFgActive: tlavender;
dialogsDateFgActive: surface1;
dialogsTextFgActive: dialogsDateFgActive;
dialogsTextFgServiceActive: dialogsNameFgActive;
dialogsDraftFgActive: tgreen;
dialogsVerifiedIconBgActive: dialogsTextFgActive;
dialogsVerifiedIconFgActive: dialogsBgActive;
dialogsSendingIconFgActive: overlay2;
dialogsSentIconFgActive: dialogsTextFgActive;
dialogsUnreadBgActive: dialogsTextFgActive;
dialogsUnreadBgMutedActive: dialogsDraftFgActive;
dialogsUnreadFgActive: dialogsBgActive;
dialogsOnlineBadgeFgActive: dialogsOnlineBadgeFg;
dialogsScamFgActive: dialogsDraftFgActive;
dialogsRippleBg: windowBgRipple;
dialogsRippleBgActive: activeButtonBgRipple;
dialogsForwardBg: dialogsBgActive;
dialogsForwardFg: dialogsNameFgActive;
searchedBarBg: windowBgOver;
searchedBarFg: windowSubTextFgOver;
topBarBg: windowBg;
emojiPanBg: windowBg;
emojiPanCategories: mantle;
emojiPanHeaderFg: windowSubTextFg;
emojiPanHeaderBg: tlavender;
emojiIconFg: checkboxFg;
emojiIconFgActive: windowBgActive;
stickerPanDeleteBg: tred;
stickerPanDeleteFg: windowFgActive;
stickerPreviewBg: layerBg;
historyTextInFg: windowFg;
historyTextInFgSelected: historyTextInFg;
historyTextOutFg: windowFg;
historyTextOutFgSelected: historyTextOutFg;
historyLinkInFg: windowActiveTextFg;
historyLinkInFgSelected: historyLinkInFg;
historyLinkOutFg: windowActiveTextFg;
historyLinkOutFgSelected: historyLinkOutFg;
historyFileNameInFg: historyTextInFg;
historyFileNameInFgSelected: historyFileNameInFg;
historyFileNameOutFg: historyTextOutFg;
historyFileNameOutFgSelected: historyFileNameOutFg;
historyOutIconFg: dialogsSentIconFg;
historyOutIconFgSelected: overlay2;
historyIconFgInverted: overlay2;
historySendingOutIconFg: overlay2;
historySendingInIconFg: overlay2;
historySendingInvertedIconFg: overlay2;
historyCallArrowInFg: callArrowFg;
historyCallArrowInFgSelected: callArrowFg;
historyCallArrowMissedInFg: callArrowMissedFg;
historyCallArrowMissedInFgSelected: callArrowMissedFg;
historyCallArrowOutFg: historyCallArrowInFg;
historyCallArrowOutFgSelected: historyCallArrowInFgSelected;
historyUnreadBarBg: windowBg;
historyUnreadBarBorder: shadowFg;
historyUnreadBarFg: tgreen;
historyForwardChooseBg: crust;
historyForwardChooseFg: windowFgActive;
historyPeer1NameFg: tred;
historyPeer1NameFgSelected: historyPeer1NameFg;
historyPeer1UserpicBg: tred;
historyPeer2NameFg: tgreen;
historyPeer2NameFgSelected: historyPeer2NameFg;
historyPeer2UserpicBg: tgreen;
historyPeer3NameFg: tpeach;
historyPeer3NameFgSelected: historyPeer3NameFg;
historyPeer3UserpicBg: tpeach;
historyPeer4NameFg: tsky;
historyPeer4NameFgSelected: historyPeer4NameFg;
historyPeer4UserpicBg: tsky;
historyPeer5NameFg: tlavender;
historyPeer5NameFgSelected: historyPeer5NameFg;
historyPeer5UserpicBg: tlavender;
historyPeer6NameFg: tpink;
historyPeer6NameFgSelected: historyPeer6NameFg;
historyPeer6UserpicBg: tpink;
historyPeer7NameFg: tteal;
historyPeer7NameFgSelected: historyPeer7NameFg;
historyPeer7UserpicBg: tteal;
historyPeer8NameFg: trosewater;
historyPeer8NameFgSelected: historyPeer8NameFg;
historyPeer8UserpicBg: trosewater;
historyPeerUserpicFg: windowFgActive;
historyPeerSavedMessagesBg: historyPeer4UserpicBg;
historyPeerArchiveUserpicBg: dialogsUnreadBgMuted;
historyScrollBarBg: ${base02.hexT};
historyScrollBarBgOver: ${base02.hexT};
historyScrollBg: ${base07.hexT};
historyScrollBgOver: ${base07.hexT};
scrollBgOvermsgInBg: windowBg;
msgInBgSelected: surface1;
msgOutBg: mantle;
msgOutBgSelected: msgInBgSelected;
msgSelectOverlay: tlavender;
msgStickerOverlay: msgSelectOverlay;
msgInServiceFg: windowActiveTextFg;
msgInServiceFgSelected: windowActiveTextFg;
msgOutServiceFg: tlavender;
msgOutServiceFgSelected: tlavender;
msgInShadow: mantle;
msgInShadowSelected: msgInShadow;
msgOutShadow: msgInShadow;
msgOutShadowSelected: msgInShadow;
msgInDateFg: overlay1;
msgInDateFgSelected: tlavender;
msgOutDateFg: msgInDateFg;
msgOutDateFgSelected: msgInDateFgSelected;
msgServiceFg: windowFgActive;
msgServiceBg: ${base02.hexT};
msgServiceBgSelected: ${base02.hexT};
msgInReplyBarColor: activeLineFg;
msgInReplyBarSelColor: activeLineFg;
msgOutReplyBarColor: historyOutIconFg;
msgOutReplyBarSelColor: historyOutIconFgSelected;
msgImgReplyBarColor: msgServiceFg;
msgInMonoFg: tgreen;
msgOutMonoFg: msgInMonoFg;
msgInMonoFgSelected: msgInMonoFg;
msgOutMonoFgSelected: msgOutMonoFg;
msgDateImgFg: text;
msgDateImgBg: mantleCC;
msgDateImgBgOver: msgDateImgBg;
msgDateImgBgSelected: msgDateImgBg;
msgFileThumbLinkInFg: lightButtonFg;
msgFileThumbLinkInFgSelected: lightButtonFgOver;
msgFileThumbLinkOutFg: tlavender;
msgFileThumbLinkOutFgSelected: tlavender;
msgFileInBg: tgreen;
msgFileInBgOver: msgFileInBg;
msgFileInBgSelected: msgFileInBg;
msgFileOutBg: msgFileInBg;
msgFileOutBgOver: msgFileInBg;
msgFileOutBgSelected: msgFileInBg;
msgFile1Bg: tlavender;
msgFile1BgDark: tlavender;
msgFile1BgOver: tlavender;
msgFile1BgSelected: tlavender;
msgFile2Bg: tgreen;
msgFile2BgDark: tgreen;
msgFile2BgOver: tgreen;
msgFile2BgSelected: tgreen;
msgFile3Bg: tred;
msgFile3BgDark: tred;
msgFile3BgOver: tred;
msgFile3BgSelected: tred;
msgFile4Bg: tpeach;
msgFile4BgDark: tpeach;
msgFile4BgOver: tpeach;
msgFile4BgSelected: tpeach;
historyFileInIconFg: msgInBg;
historyFileInIconFgSelected: msgInBgSelected;
historyFileInRadialFg: historyFileInIconFg;
historyFileInRadialFgSelected: historyFileInIconFgSelected;
historyFileOutIconFg: msgOutBg;
historyFileOutIconFgSelected: msgOutBgSelected;
historyFileOutRadialFg: historyFileOutIconFg;
historyFileOutRadialFgSelected: historyFileOutIconFgSelected;
historyFileThumbIconFg: msgInBg;
historyFileThumbIconFgSelected: msgInBgSelected;
historyFileThumbRadialFg: historyFileThumbIconFg;
historyFileThumbRadialFgSelected: historyFileThumbIconFgSelected;
historyVideoMessageProgressFg: historyFileThumbIconFg;
msgWaveformInActive: tlavender;
msgWaveformInActiveSelected: msgWaveformInActive;
msgWaveformInInactive: surface1;
msgWaveformInInactiveSelected: base;
msgWaveformOutActive: msgWaveformInActive;
msgWaveformOutActiveSelected: msgWaveformInActive;
msgWaveformOutInactive: msgWaveformInInactive;
msgWaveformOutInactiveSelected: msgWaveformInInactiveSelected;
msgBotKbOverBgAdd: text;
msgBotKbIconFg: msgServiceFg;
msgBotKbRippleBg: crust;
mediaInFg: msgInDateFg;
mediaInFgSelected: msgInDateFgSelected;
mediaOutFg: msgOutDateFg;
mediaOutFgSelected: msgOutDateFgSelected;
youtubePlayIconBg: tred;
youtubePlayIconFg: windowFgActive;
videoPlayIconBg: crust;
videoPlayIconFg: text;
toastBg: crust;
toastFg: windowFgActive;
reportSpamBg: emojiPanHeaderBg;
reportSpamFg: windowFg;
historyToDownBg: windowBg;
historyToDownBgOver: windowBgOver;
historyToDownBgRipple: windowBgRipple;
historyToDownFg: menuIconFg;
historyToDownFgOver: menuIconFgOver;
historyToDownShadow: crust;
historyComposeAreaBg: mantle;
historyComposeAreaFg: historyTextInFg;
historyComposeAreaFgService: msgInDateFg;
historyComposeIconFg: menuIconFg;
historyComposeIconFgOver: menuIconFgOver;
historySendIconFg: windowBgActive;
historySendIconFgOver: windowBgActive;
historyPinnedBg: historyComposeAreaBg;
historyReplyBg: historyComposeAreaBg;
historyReplyIconFg: windowBgActive;
historyReplyCancelFg: cancelIconFg;
historyReplyCancelFgOver: cancelIconFgOver;
historyComposeButtonBg: historyComposeAreaBg;
historyComposeButtonBgOver: windowBgOver;
historyComposeButtonBgRipple: windowBgRipple;
mapPointDrop: tred;
mapPointDot: text;
overviewCheckBg: crust;
overviewCheckBgActive: windowBgActive;
overviewCheckBorder: windowBg;
overviewCheckFg: windowBg;
overviewCheckFgActive: windowBg;
overviewPhotoSelectOverlay: tlavender;
profileStatusFgOver: tlavender;
profileVerifiedCheckBg: windowBgActive;
profileVerifiedCheckFg: windowFgActive;
profileAdminStartFg: windowBgActive;
profileAdminStarFgOver: profileAdminStartFg;
profileOtherAdminStarFg: windowSubTextFg;
profileOtherAdminStarFgOver: profileStatusFgOver;
notificationsBoxMonitorFg: windowFg;
notificationsBoxScreenBg: dialogsBgActive;
notificationSampleUserpicFg: windowBgActive;
notificationSampleCloseFg: subtext1;
notificationSampleTextFg: subtext1;
notificationSampleNameFg: overlay0;
changePhoneSimcardFrom: notificationSampleTextFg;
changePhoneSimcardTo: notificationSampleNameFg;
mainMenuBg: windowBg;
mainMenuCoverBg: tlavender;
mainMenuCoverFg: mantle;
mainMenuCloudFg: activeButtonFg;
mainMenuCloudBg: mantle;
mediaPlayerBg: windowBg;
mediaPlayerActiveFg: windowBgActive;
mediaPlayerInactiveFg: sliderBgInactive;
mediaPlayerDisabledFg: tsky;
mediaviewFileBg: windowBg;
mediaviewFileNameFg: windowFg;
mediaviewFileSizeFg: windowSubTextFg;
mediaviewFiletredCornerFg: tred;
mediaviewFiletyellowCornerFg: tpeach;
mediaviewFiletgreenCornerFg: tgreen;
mediaviewFiletblueCornerFg: tsky;
mediaviewFileExtFg: activeButtonFg;
mediaviewMenuBg: layerBg;
mediaviewMenuBgOver: activeButtonFg;
mediaviewMenuBgRipple: activeButtonFg;
mediaviewMenuFg: tlavender;
mediaviewBg: dialogsBgActive;
mediaviewVideoBg: imageBg;
mediaviewControlBg: tlavender;
mediaviewControlFg: windowFgActive;
mediaviewCaptionBg: mantle;
mediaviewCaptionFg: text;
mediaviewTextLinkFg: tsky;
mediaviewSaveMsgBg: layerBg;
mediaviewSaveMsgFg: mediaviewControlBg;
mediaviewPlaybackActive: subtext1;
mediaviewPlaybackInactive: mantle;
mediaviewPlaybackActiveOver: text;
mediaviewPlaybackInactiveOver: surface0;
mediaviewPlaybackProgressFg: text;
mediaviewPlaybackIconFg: mediaviewPlaybackActive;
mediaviewPlaybackIconFgOver: mediaviewPlaybackActiveOver;
mediaviewTransparentBg: text;
mediaviewTransparentFg: subtext1;
notificationBg: windowBg;
callBg: subtext0;
callNameFg: text;
callFingerprintBg: crust;
callStatusFg: surface1;
callIconFg: text;
callAnswerBg: tgreen;
callAnswerRipple: tgreen;
callAnswerBgOuter: tgreen;
callHangupBg: tred;
callHangupRipple: tred;
callCancelBg: text;
callCancelFg: overlay0;
callCancelRipple: text;
callMuteRipple: text;
callBarBg: dialogsBgActive;
callBarMuteRipple: dialogsRippleBgActive;
callBarBgMuted: surface2;
callBarUnmuteRipple: overlay0;
callBarFg: dialogsNameFgActive;
importantTooltipBg: toastBg;
importantTooltipFg: toastFg;
importantTooltipFgLink: mediaviewTextLinkFg;
outdatedFg: text;
outdateSoonBg: tpeach;
outdatedBg: tmaroon;
sideBarBg: mantle;
sideBarBgActive: surface2;
sideBarBgRipple: surface1;
sideBarTextFg: overlay1;
sideBarTextFgActive: overlay2;
sideBarIconFg: sideBarTextFg;
sideBarIconFgActive: sideBarTextFgActive;
sideBarBadgeBg: tgreen;
sideBarBadgeBgMuted: overlay2;
sideBarBadgeFg: mantle;
  '';
}