Tdesktop: Please document colors.tdesktop-theme better.

Created on 12 Jan 2017  Â·  13Comments  Â·  Source: telegramdesktop/tdesktop

I can't tell you how many things I've come across programs that have such flexible styling options but just document said feature poorly if at all. It would really be nice to get a small wiki page or something that broke down what each color option affected/did.

help wanted

Most helpful comment

@gudvinr Nice looking one here:

If you are trying to create a new theme, take a look to SolidDark theme: https://github.com/MasterGroosha/telegram-soliddark-theme/blob/master/colors.tdesktop-theme

It's a nice example with:

— Documented attributes.
— Separated by sections.
— Global color variables.

All 13 comments

You can edit the wiki or make a PR

The problem is I shouldn't _have_ to. They made the feature and it's their job as maintainers of an application to properly document it since they are the ones most familiar with the software under the hood.

How can @Joaquin-V edit the wiki or make a PR if (s)he doesn't understand the styling options because... they're not properly documented? We can improve documentation if we understand what its documenting, but if not, then the authors have to do so.

@gudvinr Nice looking one here:

If you are trying to create a new theme, take a look to SolidDark theme: https://github.com/MasterGroosha/telegram-soliddark-theme/blob/master/colors.tdesktop-theme

It's a nice example with:

— Documented attributes.
— Separated by sections.
— Global color variables.

Created Wiki (blank at this moment): https://github.com/telegramdesktop/tdesktop/wiki/Theme-Reference

Thanks for the reference @john-preston I can use it as a starting point.

Not sure if this has been done before, but here's a theme with random, unique colors (which are also as far apart from each other as possible). Apply it, color pick something and then search for that HEX value to see what attribute matches.

https://gist.github.com/dulnan/323b4d14f15c295c6d92612624fb971e

@john-preston I just made the table in the wiki using your link as a base. The documentation is lacking though. Also, what I plan to add in the _Illustration_ column is a tiny screenshot showing exactly what component that color will apply to. But I think it may not be necessary if the _Description_ column can pinpoint it using words.

@dulnan Is every color in the 391 chosen colors shown somewhere in the screenshot?

@ADTC I did not verify if all theme attributes are actually being used. There's a lot of attributes that are so super specific, I was not able to find out where exactly that color is being used in the application. The "theme preview" screenshot covers only a handful of the colors.

If you can help fill out the missing descriptions that will be great. I'll work on the screenshots when I get some free time (my life is often quite busy). I need to redo some screenshots as I realized the identifier color was mistakenly used for multiple elements (due to aliasing).

I think this commit (ed4b9bc40b1892ccc6a519b76748a820c2a55990) will satisfy you :)
Now all strings are commented.

Thank you, I have updated to the official descriptions. The following do not have any description though:

  • historySystemBg
  • historySystemBgSelected
  • historySystemFg
  • searchedBarBorder

These strings have disappeared from colors file.

Yes, apparently so. Does that mean they are no longer used? Anyway I have removed them.

PS: For anyone reading to the end, this is now documented in the wiki: https://github.com/telegramdesktop/tdesktop/wiki/Theme-Reference

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Mindstormer619 picture Mindstormer619  Â·  3Comments

abhyrz picture abhyrz  Â·  3Comments

whywhyy picture whywhyy  Â·  3Comments

qwitriy picture qwitriy  Â·  3Comments

TotalKrill picture TotalKrill  Â·  3Comments