Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I've done quite a bit of work on the color module which resulted in several issues so I'm adding a patch here with all the fixes and enhancements.
next steps:
- decide if those other issues should be closed in favor of this on.
- list all those issues here in the summary and as related issues (the [#NNNNNN] pattern we can use in our issue queue is nice for linking issues in text)
- issue summary update (instructions: https://drupal.org/contributor-tasks/write-issue-summary)
Comment | File | Size | Author |
---|---|---|---|
#41 | reroll_diff_36-41.txt | 377 bytes | ravi.shankar |
#41 | 1763040-41.patch | 3.71 KB | ravi.shankar |
#36 | reroll_diff_16-36.txt | 2.47 KB | ravi.shankar |
#36 | 1763040-36.patch | 3.79 KB | ravi.shankar |
#16 | drupal8.color-module.1763040-16.patch | 3.71 KB | mgifford |
Comments
Comment #1
Reg CreditAttribution: Reg commentedThis patch does the following:
The patch is against 7.15 but since we're doing everything in 8 and then back porting I changed the version to 8.
Comment #2
Reg CreditAttribution: Reg commentedForgot to include the change to a regex on the previous patch.
Comment #3
Reg CreditAttribution: Reg commentedAn improvement to the regex. In the rare case that someone has decimal point in the opacity will still work.
Comment #4
markhalliwellAt quick glance this looks promising and pretty straight forward. I will take a deeper look into this patch further when I have the time. Could you re-roll this against D8 core though? You changed the version but never actually posted a viable D8 patch.
Are these issues on d.o or are you just referring to your daily use with the module? If they are, could you reference them here. Thanks!
Also, remove these tabbed spaces (ie: between $re, and $rgba).
Comment #5
markhalliwellSigh, wrong status lol Didn't mean to trigger tests.
Comment #6
markhalliwelltagging
Comment #7
brockfanning CreditAttribution: brockfanning commentedComment #8
brockfanning CreditAttribution: brockfanning commentedBit off more than can chew, currently, but I may grab this again if things calm down at work.
Comment #9
Albert Volkman CreditAttribution: Albert Volkman commentedRe-roll of #3 for D8.
Also applied @Mark Carver's suggestion from #4.
Comment #10
tim.plunkett#9: color-module-1763040-9.patch queued for re-testing.
Comment #12
Albert Volkman CreditAttribution: Albert Volkman commentedRe-roll.
Comment #13
star-szrThanks @Albert Volkman, removing reroll tag.
Comment #13.0
star-szrFixed typo.
Comment #14
YesCT CreditAttribution: YesCT commentedMy guess is that we are better off with the separate issues, any reason not to put these things back into those issues?
Comment #15
Reg CreditAttribution: Reg commentedIt's been so long since I created this that I don't remember the specifics but from memory the pieces all relate tight enough that it's probably worth leaving it as one patch here and just calling it a color shifting enhancement patch or something like that.
Comment #16
mgiffordNeeded a reroll.
Comment #17
jhedstromPatch still applies with offset. The summary should be updated to clarify what this accomplishes.
Comment #18
joachim CreditAttribution: joachim commentedPatch has code formatting and documentation problems.
Also, yes, the issue summary should say what this patch is actually doing. What are these new conversion functions for?
Comment #22
alexej_d CreditAttribution: alexej_d commentedHow come this issue is dead for 2 years already? Why not review it or close the issue?
Comment #23
cilefen CreditAttribution: cilefen commentedIt's been reviewed. People seemed to like it but it needs an issue summary update.
Comment #27
andypostComment #28
HOG CreditAttribution: HOG at Skilld, Drupal Ukraine Community commentedAfter apply this patch: https://www.drupal.org/project/drupal/issues/1763040#comment-8882561
I see 2 issues.
1. Can't save the form with rgba values:
2. Drupal return colors object with an array in first item:
Comment #34
kostyashupenkoBump.
It's almost a middle of 2022th year already. We need HSL format colours and we need even more...
I just installed a fresh Drupal 9.3.9 with standard profile installation and i still see these features are not implemented, so sad(
I'm thinking about smth like "Settings" link of the Color module on this page `/admin/modules`, and by clicking on it you are redirecting to its settings page.
Settings page contains information like "How do you want to declare and store colours on your web-site?" and several options below, like:
1. hex
2. rgb(r, g, b)
3. r, g, b
4. hsl(h, s, l)
5. h, s, l
Something like this. I also thinking about 5th point here, it would be really nice to store colours like these (namings of course are just for example):
So in that case we can let user configure only --color-blue-source, and the rest of colours (even colors including alpha channel) will be automatically updated.
By the way, please let me know how do you handle color palettes on your real projects right now? How do you override colors of theme's palette?
Comment #35
andypostComment #36
ravi.shankar CreditAttribution: ravi.shankar at OpenSense Labs commentedAdded reroll of patch #16 on Drupal 9.4.x.
Comment #37
mherchelDrupal ate my previous comment 😭
Anyway, the Olivero theme generates its palette by adjusting the luminosity in the HSL colors. So, this functionality is important. As far as client projects, it really depends on the needs.
Comment #39
quietone CreditAttribution: quietone at PreviousNext commentedThis work doesn't look like it should be a child of #3270894: [Meta] Tasks to deprecate Color (which was just committed), therefore removing the parent.
Comment #40
quietone CreditAttribution: quietone at PreviousNext commentedColor has been removed from core, #3270899: Remove Color module from core.
Comment #41
ravi.shankar CreditAttribution: ravi.shankar at OpenSense Labs commentedAdded a patch #36 on color module.