GNU nano - Patches: patch #10131, add support for specifying RGB...
You are not allowed to post comments on this tracker with your current authentication level.
patch #10131: add support for specifying RGB colors
Submitter: | Brad Town <townba> | ||
Submitted: | Tue 02 Nov 2021 03:57:29 AM UTC | ||
Priority: | 5 - Normal | Status: | Done |
Privacy: | Public | Assigned to: | bens |
Open/Closed: | Closed | Release: | None |
Jump to the original submission
Tue 23 Nov 2021 11:18:01 AM UTC, comment #15: |
Benno Schulenberg <bens> |
Mon 15 Nov 2021 09:40:58 AM UTC, comment #14: The signed-off patch looks good. Ready to post.
|
Benno Schulenberg <bens> |
Sun 14 Nov 2021 06:33:18 PM UTC, comment #13: Signed-off patch attached with message format similar to the ones you've used. (Haven't done this with git before, so please forgive me if I missed something.)
|
Brad Town <townba> |
Sun 14 Nov 2021 12:24:49 PM UTC, comment #12: Thanks for the snippet of color-slices code. It's amazing how many shades of color my eye can distinguish when they are right next to each other. (The direct color seems to work fine on my Xfce terminal, but shows just mostly blue and greenish vertical bars on an xterm, version 330.)
|
Benno Schulenberg <bens> |
Sat 13 Nov 2021 10:38:00 PM UTC, comment #11: Just realized I was multiplying by the wrong number to get from [0, 1] to the offset thresholds -- I should have been using (n – 1) instead of n. So the correct offsets for the eight-item array are … exactly what I have in my patch. Huh.
|
Brad Town <townba> |
Sat 13 Nov 2021 08:59:48 PM UTC, comment #10: New patch. Dropped the variables, renamed and shortened the array, dropped a comment, dropped "static", renamed the function, and added an "&" to ensure we don't accidentally walk off the end of the array.
|
Brad Town <townba> |
Sat 13 Nov 2021 11:12:06 AM UTC, comment #9: Thanks. Things begin to look good. Personally I would drop the intermediate variables ro, go and bo, give the array a short name, so that it becomes a straightforward 'return 36 level[red] + 6 level[green] + level[blue] + 16', but that is a detail. Other than that, some questions.
|
Benno Schulenberg <bens> |
Fri 12 Nov 2021 05:26:42 PM UTC, comment #8: How about this patch?
|
Brad Town <townba> |
Fri 12 Nov 2021 11:52:48 AM UTC, comment #7: Thanks for the patch. And thanks for including the short #rgb format -- I think that short format fits nano much better. Plus: the #rrggbb format gives the false impression of being able to specify colors very precisely, so I would drop that entirely.
and then paste those same lines into the README file, and then run a nano with your patch and (in a second terminal tab) a nano with the attached simpler patch, both with README as argument, and then flip back and forth between the tabs, I can see some of your grays are slightly, slightly lighter. But... when using these colors to accentuate text (what these colors are about), would you be able to tell the difference between your #aaa gray and your #bbb gray if the affected words were two lines apart? I can't. And I'm pretty sure I would use at most two levels of grey (if I were to use grey at all) in a syntax definition. In short: I think giving the user the ability to specify such precise levels of grey is unneeded.
|
Benno Schulenberg <bens> |
Thu 11 Nov 2021 09:54:54 PM UTC, comment #6: New version of the patch attached.
|
Brad Town <townba> |
Tue 09 Nov 2021 10:31:04 AM UTC, comment #5: Okay. I'm looking forward to the first patch. :)
|
Benno Schulenberg <bens> |
Tue 09 Nov 2021 02:34:12 AM UTC, comment #4: I tried the lookup-table approach. It’s visually good, easier to understand, and fast (assembly output for both ARM and x86-64 shows around three or four instructions), so I’ll go with that approach.
|
Brad Town <townba> |
Mon 08 Nov 2021 06:11:30 PM UTC, comment #3: Yes, I will. I was out of commission last week and couldn’t work on it.
|
Brad Town <townba> |
Sun 07 Nov 2021 01:54:43 PM UTC, comment #2: Hello Brad,
|
Benno Schulenberg <bens> |
Wed 03 Nov 2021 11:20:05 AM UTC, comment #1: Thanks for the patch. ... It seems you have recreated Brand Huntman's work in a different way. (See the long thread that starts at https://lists.gnu.org/archive/html/nano-devel/2018-02/msg00068.html, and the discussion that triggered it: https://lists.gnu.org/archive/html/nano-devel/2017-12/msg00129.html, continued in https://lists.gnu.org/archive/html/nano-devel/2018-01/msg00005.html.)
|
Benno Schulenberg <bens> |
Tue 02 Nov 2021 03:57:29 AM UTC, original submission:
Improve color support
Overview
Example use
Considerations
Changes
Code
Info and manpage
Syntax highlighting for nanorc
Testing
Possible later work
|
Brad Town <townba> |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 16 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2021-11-23 | bens | Status | In Progress | Done | |
Open/Closed | Open | Closed | |||
Summary | Add support for specifying RGB colors | add support for specifying RGB colors | |||
2021-11-14 | townba | Attached File | - | Added 0001-rcfile-support-rgb-format-for-specifying-colors-in-2.patch, #52278 | |
2021-11-14 | bens | Attached File | - | Added less-computation.patch, #52273 | |
Attached File | - | Added colorcodes.py, #52274 | |||
2021-11-13 | townba | Attached File | - | Added patch1e.patch, #52270 | |
Attached File | - | Added example-cube-slices-1e.zip, #52271 | |||
2021-11-12 | townba | Attached File | - | Added patch1d.patch, #52262 | |
2021-11-12 | bens | Attached File | - | Added simpler.patch, #52259 | |
2021-11-11 | townba | Attached File | - | Added patch1b.patch, #52241 | |
2021-11-09 | bens | Status | Need Info | In Progress | |
2021-11-03 | bens | Attached File | - | Added colors.py, #52193 | |
Status | None | Need Info | |||
Assigned to | None | bens | |||
2021-11-02 | townba | Attached File | - | Added 0001-Improve-color-support.patch, #52181 |
Powered by Savane 3.13-caa5.
Corresponding source code
The patch has been applied in commit 8d6b468c.