mirror of
https://github.com/go-gitea/gitea.git
synced 2026-07-15 11:39:31 -05:00
Heatmap: hue gradient instead of saturation #2823
Closed
opened 2025-11-02 04:49:41 -06:00 by GiteaMirror
·
43 comments
No Branch/Tag Specified
main
release/v1.25
release/v1.24
release/v1.23
release/v1.22
release/v1.21
release/v1.20
release/v1.19
release/v1.18
release/v1.17
release/v1.16
release/v1.15
release/v1.14
release/v1.13
release/v1.12
release/v1.11
release/v1.10
release/v1.9
release/v1.8
v1.25.3
v1.25.2
v1.25.1
v1.25.0
v1.24.7
v1.25.0-rc0
v1.26.0-dev
v1.24.6
v1.24.5
v1.24.4
v1.24.3
v1.24.2
v1.24.1
v1.24.0
v1.23.8
v1.24.0-rc0
v1.25.0-dev
v1.23.7
v1.23.6
v1.23.5
v1.23.4
v1.23.3
v1.23.2
v1.23.1
v1.23.0
v1.23.0-rc0
v1.24.0-dev
v1.22.6
v1.22.5
v1.22.4
v1.22.3
v1.22.2
v1.22.1
v1.22.0
v1.23.0-dev
v1.22.0-rc1
v1.21.11
v1.22.0-rc0
v1.21.10
v1.21.9
v1.21.8
v1.21.7
v1.21.6
v1.21.5
v1.21.4
v1.21.3
v1.21.2
v1.20.6
v1.21.1
v1.21.0
v1.21.0-rc2
v1.21.0-rc1
v1.20.5
v1.22.0-dev
v1.21.0-rc0
v1.20.4
v1.20.3
v1.20.2
v1.20.1
v1.20.0
v1.19.4
v1.21.0-dev
v1.20.0-rc2
v1.20.0-rc1
v1.20.0-rc0
v1.19.3
v1.19.2
v1.19.1
v1.19.0
v1.19.0-rc1
v1.20.0-dev
v1.19.0-rc0
v1.18.5
v1.18.4
v1.18.3
v1.18.2
v1.18.1
v1.18.0
v1.17.4
v1.18.0-rc1
v1.19.0-dev
v1.18.0-rc0
v1.17.3
v1.17.2
v1.17.1
v1.17.0
v1.17.0-rc2
v1.16.9
v1.17.0-rc1
v1.18.0-dev
v1.16.8
v1.16.7
v1.16.6
v1.16.5
v1.16.4
v1.16.3
v1.16.2
v1.16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0-rc1
v1.3.2
v1.3.1
v1.3.0
v1.3.0-rc2
v1.3.0-rc1
v1.2.3
v1.2.2
v1.2.1
v1.2.0
v1.2.0-rc3
v1.2.0-rc2
v1.1.4
v1.2.0-rc1
v1.1.3
v1.1.2
v1.1.1
v1.1.0
v1.0.2
v1.0.1
v1.0.0
v0.9.99
Labels
Clear labels
$20
$250
$50
$500
backport/done
💎 Bounty
docs-update-needed
good first issue
hacktoberfest
issue/bounty
issue/confirmed
issue/critical
issue/duplicate
issue/needs-feedback
issue/not-a-bug
issue/regression
issue/stale
issue/workaround
lgtm/need 2
modifies/api
modifies/translation
outdated/backport/v1.18
outdated/theme/markdown
outdated/theme/timetracker
performance/bigrepo
performance/cpu
performance/memory
performance/speed
pr/breaking
proposal/accepted
proposal/rejected
pr/wip
pull-request
reviewed/wontfix
💰 Rewarded
skip-changelog
status/blocked
topic/accessibility
topic/api
topic/authentication
topic/build
topic/code-linting
topic/commit-signing
topic/content-rendering
topic/deployment
topic/distribution
topic/federation
topic/gitea-actions
topic/issues
topic/lfs
topic/mobile
topic/moderation
topic/packages
topic/pr
topic/projects
topic/repo
topic/repo-migration
topic/security
topic/theme
topic/ui
topic/ui-interaction
topic/ux
topic/webhooks
topic/wiki
type/bug
type/deprecation
type/docs
type/enhancement
type/feature
type/miscellaneous
type/proposal
type/question
type/refactoring
type/summary
type/testing
type/upstream
Mirrored from GitHub Pull Request
Milestone
No items
No Milestone
Projects
Clear projects
No project
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/gitea#2823
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @davidak on GitHub (Jan 26, 2019).
[x]):Description
GitHub is perfect.
Screenshots
Gitea
GitHub
GitLab
@zeripath commented on GitHub (Jan 26, 2019):
I'm not sure. I've never quite been able to understand GitHubs hue gradient - saturation seems intuitive to me.
@davidak commented on GitHub (Jan 27, 2019):
@zeripath darker color means more activity. I think that's commonly used for visualization.
The current implementation seems too simple in that space.
It looks too dark and feels depressing to me. It should have the bright green of the logo included.
@0x5c commented on GitHub (Jan 27, 2019):
Ah yes, that's the problem that I was having with it, without knowing what it was.
I might be able to make a palette today.
@0x5c commented on GitHub (Jan 27, 2019):
Okay, so I took a look at the three palettes, and they all are gradient on hue, saturation, and value.
What seems to be different is the curves done on the colour-picker; GitHub and GitLab both do a curve towards the saturated/high-value corner, while Gitea does a curve in the opposite direction.
@0x5c commented on GitHub (Jan 27, 2019):
I've done some work on colouring
Current palette
Proposed palette n°1
Partial, not really suitable as-is.

Proposed palette n°2
Those proposition only contain 5 colours; it is assumed that the first one is the current (
#F4F4F4).The Gitea colour (
#609926) is included in both, at the before-last position.Feel free to modify or expand on these.
@davidak commented on GitHub (Jan 27, 2019):
@0x5c thank you!
The gradient in the first palette looks a bit hard. The color in the middle looks very unnatural. Maybe that is what you mean with "not suitable as-is".
The seconds palette looks great! Could you try it out with the actual heatmap in the browser?
Here are profiles i found with actual activity:
https://codeberg.org/hw?tab=activity
https://codeberg.org/wahn?tab=activity
@0x5c commented on GitHub (Jan 28, 2019):
No problem!
I'll try it, and maybe tweak prop2 a slight bit.
As for prop1, this is exactly what I meant, but I included it as a possible starting point for someone else, as it's what I used as a base for prop2.
@0x5c commented on GitHub (Jan 28, 2019):
Ewwwwww
So the boxes are not coloured by CSS styles, which means I'll have to manually replace the colours.
@davidak commented on GitHub (Jan 28, 2019):
@0x5c maybe just take a screenshot and replace color with gimp or so...
@0x5c commented on GitHub (Jan 28, 2019):
I have not yet been able to try recoloring, but I suspect that it will cause problems as the squares are somehow anti-aliased (why?).
I was able, however, to create this 3rd version, which now follows an entirely convex curve.
Proposed palette n°3
@davidak commented on GitHub (Jan 28, 2019):
@0x5c 3. looks good!
I just used GIMPs replace color tool on a screenshot. Looks perfect!
When it's this small and i go back 1 meter from the display, the contrast is not that high. I can hardly tell a difference between the 2. and 3. color. I think it's a little better on GitHub since it's a different color tone.
@0x5c commented on GitHub (Jan 28, 2019):
Oh nice!
I see what you mean for colour 2/3, but I don't think that it would be that much of a problem?
I could try a slight variation on colour 2 (one in the palettes).
@0x5c commented on GitHub (Jan 28, 2019):
Palette proposition v4
Slightly tweaked the first one from

#cde5b3to#d8efbf.(actual first is still
#f4f4f4)@davidak commented on GitHub (Jan 28, 2019):
Yeah, it might not be a problem. Already a huge improvement to the current colors.
@0x5c commented on GitHub (Jan 29, 2019):
Welp
The colours are auto-generated by cal-heatmap, which seems to have no concept of humans are supposed to see this.
It takes two colours, and then proceeds to create the most eye-stabbing gradient possible. It's also the reason why the heatmap squares have fudgy edges, even on the showcase site.
I do not see how, using this library, the colours of the heatmap could be fixed.
Edit:
Note that github uses absolute and defined values (the ones in the legend) for the colours.
@davidak commented on GitHub (Jan 29, 2019):
@0x5c so, when there is no better library we have to submit bugreports upstream and maybe find someone who can fix it. It could optionally be possible to set the colors manually.
@zeripath commented on GitHub (Jan 29, 2019):
Looking at the upstream if we just don't set the legendColors we should be able to use the .q1-.q5 css to set the colors
@0x5c commented on GitHub (Jan 29, 2019):
Seems to be an issue of how thing are done (upstream, that is).
As for better libraries, I think that the issues is of actually choosing, as there seems to be a ton of heatmap libraries that use the exact same dataset (would only need changes on the client side).
@0x5c commented on GitHub (Jan 29, 2019):
Nice of the upstream documentation to making this clear 😅.
@zeripath commented on GitHub (Jan 29, 2019):
Actually I think it's not q1 but in here:
0b510725c9/public/less/_base.less (L609)@0x5c commented on GitHub (Jan 29, 2019):
If the palette I proposed is liked, I'd like to attempt making a PR, although I could need pointers on how to tackle Gitea's code.
@zeripath commented on GitHub (Jan 29, 2019):
So simply changing those 6 classes should do it?
@zeripath commented on GitHub (Jan 29, 2019):
@0x5c I think would be a quite simple PR - just change the less code, commit and put up a pr with screenshots of what it used to look like and what it now looks like.
@0x5c commented on GitHub (Jan 29, 2019):
That's if changing the values is actually possible.
Still looking at the docs
@zeripath commented on GitHub (Jan 29, 2019):
Changing the values in the less file, then run
make generate-stylesheetsshould do it afaics@0x5c commented on GitHub (Jan 29, 2019):
Okay, so
That's clearly definable in CSS, which means that
@zeripath commented on GitHub (Jan 29, 2019):
At least in master we're actually using the vue-calendar-heatmap module rather than that cal-heatmap package.
@0x5c commented on GitHub (Jan 29, 2019):
What? Where is the PR for that?
@jolheiser commented on GitHub (Jan 29, 2019):
https://github.com/go-gitea/gitea/pull/5401
@davidak commented on GitHub (Jan 29, 2019):
You can also change it via CSS: https://github.com/go-gitea/gitea/pull/5401/files#diff-55ceecf712d36e64d0cc61b96617263aR609
@zeripath commented on GitHub (Jan 29, 2019):
Those are actually less files so you then need to generate-stylesheet but yes.
@0x5c commented on GitHub (Jan 29, 2019):
Simple PR then :)
Would setting up a dev environment be required?Edit: When I think, things become clear: TESTING@cdlm commented on GitHub (Feb 11, 2019):
Please take care of reversing the palette in the dark theme, so that higher contrast to the background color (more visual pop) signifies more contributions. I've just updated to 1.7.1 and it's backwards :-)
@0x5c commented on GitHub (Feb 11, 2019):
The dark theme will need its own palette
@zeripath commented on GitHub (Feb 13, 2019):
How's things with this? Are you ready for a pr? I know the deadline for 1.8 is coming up so if want this change in 1.8 a PR is needed soon.
@0x5c commented on GitHub (Feb 13, 2019):
I had massive issues with my computer, but that is solved now. I will be working on that today.
@kolaente commented on GitHub (Apr 9, 2019):
@0x5c Any updates on this?
@stale[bot] commented on GitHub (Jun 8, 2019):
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
@0x5c commented on GitHub (Jun 9, 2019):
Oh damn, I had forgotten about this.
@MayMeow commented on GitHub (Oct 27, 2019):
I have implemented this on https://kittyverse.co/may?tab=activity (you can check). Implemented is palette 4. If its ok i can make pull request. or implemetn any other palette. :)
@davidak commented on GitHub (Oct 27, 2019):
@MayMeow looks good. please create a PR.
@0x5c commented on GitHub (Oct 31, 2019):
Oh damn, I had forgotten about this.
Thank you for making the PR :)
@MayMeow commented on GitHub (Nov 6, 2019):
@0x5c @cdlm Sorry about that :) i didnt used dark theme so i didnt know