You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 28, 2025. It is now read-only.
Rollup merge of rust-lang#91480 - jsha:fewer-colors, r=GuillaumeGomez
rustdoc: use smaller number of colors to distinguish items
This reduces visual distractions when reading method signatures.
As discussed in rust-lang#59845 (comment), this categorizes items into one of six colors (down from thirteen):
- method, function (ochre `#AD7C37`)
- trait, trait alias (dark slate blue `#6E4FC9`)
- enum, struct, type alias, union, primitive (maroon `#AD378A`)
- static, module, keyword, associated type, foreign type (steel blue `#3873AD`)
- macro (green `rust-lang#68000`)
- generic params, self, Self (unmarked black `#000000`)
I slightly tweaked the actual color values so they'd have the same lightness (previously the trait color stood out much more than the others). And I made the color for links in general consistently use steel blue (previously there was a slightly different color for "search-failed").
The ayu and dark themes have been updated according to the same logic. I haven't changed any of the color values in those themes, just their assignment to types.
Demo:
https://rustdoc.crud.net/jsha/fewer-colors/std/string/struct.String.htmlhttps://rustdoc.crud.net/jsha/fewer-colors/std/vec/struct.Vec.htmlhttps://rustdoc.crud.net/jsha/fewer-colors/std/io/trait.Read.htmlhttps://rustdoc.crud.net/jsha/fewer-colors/std/iter/trait.Iterator.html
0 commit comments