* min-colors 88 @ 2022-01-27 6:14 fatiparty--- via Users list for the GNU Emacs text editor 2022-01-27 6:33 ` Yuri Khan ` (2 more replies) 0 siblings, 3 replies; 47+ messages in thread From: fatiparty--- via Users list for the GNU Emacs text editor @ 2022-01-27 6:14 UTC (permalink / raw) To: Help Gnu Emacs I keep seeing 88 for min-colors. I wonder if a different number would be more appropriate, as it seems that 88 is quite arbitrary. ^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: min-colors 88 2022-01-27 6:14 min-colors 88 fatiparty--- via Users list for the GNU Emacs text editor @ 2022-01-27 6:33 ` Yuri Khan 2022-01-27 11:48 ` Emanuel Berg via Users list for the GNU Emacs text editor 2022-01-27 12:10 ` Emanuel Berg via Users list for the GNU Emacs text editor [not found] ` <CAP_d_8U3E=FAQJ7XiNMnCi-Y4Gneo69KmEKVTuWWHOA7EVz7Gg@mail.gmail.com-MuPEX1J--7-2> 2022-01-27 6:46 ` Eli Zaretskii 2 siblings, 2 replies; 47+ messages in thread From: Yuri Khan @ 2022-01-27 6:33 UTC (permalink / raw) To: fatiparty; +Cc: Help Gnu Emacs On Thu, 27 Jan 2022 at 13:14, fatiparty--- via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote: > I keep seeing 88 for min-colors. I wonder if a different number would be more appropriate, as it seems > that 88 is quite arbitrary. Historically, there existed terminals that supported a maximum of 8 colors, 16 colors, 88 colors (basic 16 + 4×4×4 color cube + 8 grays?), then 256 colors (basic 16 + 6×6×6 cube + 24 grays), and finally 24-bit color. Unless you intend to make a color theme for wide distribution, I suggest configuring your own terminal emulators for 24-bit color and always assuming full color range. ^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: min-colors 88 2022-01-27 6:33 ` Yuri Khan @ 2022-01-27 11:48 ` Emanuel Berg via Users list for the GNU Emacs text editor 2022-01-27 12:10 ` Emanuel Berg via Users list for the GNU Emacs text editor 1 sibling, 0 replies; 47+ messages in thread From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-01-27 11:48 UTC (permalink / raw) To: help-gnu-emacs Yuri Khan wrote: >> I keep seeing 88 for min-colors. I wonder if a different >> number would be more appropriate, as it seems that 88 is >> quite arbitrary. > > Historically, there existed terminals that supported > a maximum of 8 colors, 16 colors, 88 colors (basic 16 + > 4×4×4 color cube + 8 grays?), then 256 colors (basic 16 + > 6×6×6 cube + 24 grays), and finally 24-bit color. 24-bit color, which confusingly gives you an 8-bit image, since $ echo $(( (2**8)**3 )) = $(( 256**3 )) # 16 777 216 ^^^^^^^^ one byte per each RGB colors > Unless you intend to make a color theme for wide > distribution, I suggest configuring your own terminal > emulators for 24-bit color and always assuming full > color range. The sky is the limit ... -- underground experts united https://dataswamp.org/~incal ^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: min-colors 88 2022-01-27 6:33 ` Yuri Khan 2022-01-27 11:48 ` Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-01-27 12:10 ` Emanuel Berg via Users list for the GNU Emacs text editor 1 sibling, 0 replies; 47+ messages in thread From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-01-27 12:10 UTC (permalink / raw) To: help-gnu-emacs [-- Attachment #1: Type: text/plain, Size: 837 bytes --] Yuri Khan wrote: >> I keep seeing 88 for min-colors. I wonder if a different >> number would be more appropriate, as it seems that 88 is >> quite arbitrary. > > Historically, there existed terminals that supported > a maximum of 8 colors, 16 colors, 88 colors (basic 16 + > 4×4×4 color cube + 8 grays?), then 256 colors (basic 16 + > 6×6×6 cube + 24 grays), and finally 24-bit color. Were there no monochrome terminals? My first computer was the Mac Plus: A compact Mac, the Plus has a 9-inch (23 cm) 512x342 pixel monochrome display with a resolution of 72 PPI, identical to that of previous Macintosh models. [1] This didn't prevent it from having awesome graphics, sometimes: https://dataswamp.org/~incal/pimgs/dc.png 1986 game! You can run on Linux with the Mini vMac emulator [2] - mail me if you need ROMs ... [-- Attachment #2: dc.png --] [-- Type: image/png, Size: 26930 bytes --] [-- Attachment #3: Type: text/plain, Size: 164 bytes --] [1] https://en.wikipedia.org/wiki/Macintosh_Plus [2] https://www.gryphel.com/c/minivmac/dnld_std.html -- underground experts united https://dataswamp.org/~incal ^ permalink raw reply [flat|nested] 47+ messages in thread
[parent not found: <CAP_d_8U3E=FAQJ7XiNMnCi-Y4Gneo69KmEKVTuWWHOA7EVz7Gg@mail.gmail.com-MuPEX1J--7-2>]
* min-colors 88 [not found] ` <CAP_d_8U3E=FAQJ7XiNMnCi-Y4Gneo69KmEKVTuWWHOA7EVz7Gg@mail.gmail.com-MuPEX1J--7-2> @ 2022-01-27 6:39 ` fatiparty--- via Users list for the GNU Emacs text editor 0 siblings, 0 replies; 47+ messages in thread From: fatiparty--- via Users list for the GNU Emacs text editor @ 2022-01-27 6:39 UTC (permalink / raw) To: Yuri Khan; +Cc: Help Gnu Emacs Jan 27, 2022, 18:33 by yuri.v.khan@gmail.com: > On Thu, 27 Jan 2022 at 13:14, fatiparty--- via Users list for the GNU > Emacs text editor <help-gnu-emacs@gnu.org> wrote: > >> I keep seeing 88 for min-colors. I wonder if a different number would be more appropriate, as it seems >> that 88 is quite arbitrary. >> > > Historically, there existed terminals that supported a maximum of 8 > colors, 16 colors, 88 colors (basic 16 + 4×4×4 color cube + 8 grays?), > then 256 colors (basic 16 + 6×6×6 cube + 24 grays), and finally 24-bit > color. > I can understand 88 now > Unless you intend to make a color theme for wide distribution, I > suggest configuring your own terminal emulators for 24-bit color and > always assuming full color range. > Does one still use (min-colors 88) or should this be changed (or not-used, neglected). ^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: min-colors 88 2022-01-27 6:14 min-colors 88 fatiparty--- via Users list for the GNU Emacs text editor 2022-01-27 6:33 ` Yuri Khan [not found] ` <CAP_d_8U3E=FAQJ7XiNMnCi-Y4Gneo69KmEKVTuWWHOA7EVz7Gg@mail.gmail.com-MuPEX1J--7-2> @ 2022-01-27 6:46 ` Eli Zaretskii 2022-01-27 8:43 ` fatiparty--- via Users list for the GNU Emacs text editor 2022-01-27 11:50 ` Emanuel Berg via Users list for the GNU Emacs text editor 2 siblings, 2 replies; 47+ messages in thread From: Eli Zaretskii @ 2022-01-27 6:46 UTC (permalink / raw) To: help-gnu-emacs > Date: Thu, 27 Jan 2022 07:14:15 +0100 (CET) > From: fatiparty--- via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> > > I keep seeing 88 for min-colors. I wonder if a different number would be more appropriate, as it seems > that 88 is quite arbitrary. It is not arbitrary: xterm (and its workalikes) has a mode where it supports 88 colors. That number is enough for Emacs to express all of the possible colors from the X repertoire, so we use that as a threshold for "any color is supported". ^ permalink raw reply [flat|nested] 47+ messages in thread
* min-colors 88 2022-01-27 6:46 ` Eli Zaretskii @ 2022-01-27 8:43 ` fatiparty--- via Users list for the GNU Emacs text editor 2022-01-27 9:56 ` Eli Zaretskii 2022-01-27 11:50 ` Emanuel Berg via Users list for the GNU Emacs text editor 1 sibling, 1 reply; 47+ messages in thread From: fatiparty--- via Users list for the GNU Emacs text editor @ 2022-01-27 8:43 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Help Gnu Emacs Jan 27, 2022, 18:46 by eliz@gnu.org: >> Date: Thu, 27 Jan 2022 07:14:15 +0100 (CET) >> From: fatiparty--- via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> >> >> I keep seeing 88 for min-colors. I wonder if a different number would be more appropriate, as it seems >> that 88 is quite arbitrary. >> > > It is not arbitrary: xterm (and its workalikes) has a mode where it > supports 88 colors. That number is enough for Emacs to express all of > the possible colors from the X repertoire, so we use that as a > threshold for "any color is supported". > Would you know what colour bit would the 88 colours correspond to? ^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: min-colors 88 2022-01-27 8:43 ` fatiparty--- via Users list for the GNU Emacs text editor @ 2022-01-27 9:56 ` Eli Zaretskii 2022-01-27 10:44 ` fatiparty--- via Users list for the GNU Emacs text editor 0 siblings, 1 reply; 47+ messages in thread From: Eli Zaretskii @ 2022-01-27 9:56 UTC (permalink / raw) To: help-gnu-emacs > Date: Thu, 27 Jan 2022 09:43:53 +0100 (CET) > From: fatiparty@tutanota.com > Cc: Help Gnu Emacs <help-gnu-emacs@gnu.org> > > > It is not arbitrary: xterm (and its workalikes) has a mode where it > > supports 88 colors. That number is enough for Emacs to express all of > > the possible colors from the X repertoire, so we use that as a > > threshold for "any color is supported". > > > Would you know what colour bit would the 88 colours correspond to? Sorry, I don't understand: what do you mean by "colour bit" here? ^ permalink raw reply [flat|nested] 47+ messages in thread
* min-colors 88 2022-01-27 9:56 ` Eli Zaretskii @ 2022-01-27 10:44 ` fatiparty--- via Users list for the GNU Emacs text editor 2022-01-27 10:54 ` Bastian Beranek 2022-01-27 11:01 ` Eli Zaretskii 0 siblings, 2 replies; 47+ messages in thread From: fatiparty--- via Users list for the GNU Emacs text editor @ 2022-01-27 10:44 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Help Gnu Emacs Jan 27, 2022, 21:56 by eliz@gnu.org: >> Date: Thu, 27 Jan 2022 09:43:53 +0100 (CET) >> From: fatiparty@tutanota.com >> Cc: Help Gnu Emacs <help-gnu-emacs@gnu.org> >> >> > It is not arbitrary: xterm (and its workalikes) has a mode where it >> > supports 88 colors. That number is enough for Emacs to express all of >> > the possible colors from the X repertoire, so we use that as a >> > threshold for "any color is supported". >> > >> Would you know what colour bit would the 88 colours correspond to? >> > > Sorry, I don't understand: what do you mean by "colour bit" here? > I mean the pixel depth 4-bit, 16 colours 8-bit, 256 colours 16-bit, 65,000 colours ^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: min-colors 88 2022-01-27 10:44 ` fatiparty--- via Users list for the GNU Emacs text editor @ 2022-01-27 10:54 ` Bastian Beranek 2022-01-27 11:01 ` Eli Zaretskii 1 sibling, 0 replies; 47+ messages in thread From: Bastian Beranek @ 2022-01-27 10:54 UTC (permalink / raw) To: fatiparty; +Cc: Help Gnu Emacs On Thu, Jan 27, 2022 at 11:46 AM fatiparty--- via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote: > > Jan 27, 2022, 21:56 by eliz@gnu.org: > > >> Date: Thu, 27 Jan 2022 09:43:53 +0100 (CET) > >> From: fatiparty@tutanota.com > >> Cc: Help Gnu Emacs <help-gnu-emacs@gnu.org> > >> > >> > It is not arbitrary: xterm (and its workalikes) has a mode where it > >> > supports 88 colors. That number is enough for Emacs to express all of > >> > the possible colors from the X repertoire, so we use that as a > >> > threshold for "any color is supported". > >> > > >> Would you know what colour bit would the 88 colours correspond to? > >> > > > > Sorry, I don't understand: what do you mean by "colour bit" here? > > > > I mean the pixel depth > > 4-bit, 16 colours > 8-bit, 256 colours > 16-bit, 65,000 colours 6.459-bit, 88 colours, clearly :-) > > ^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: min-colors 88 2022-01-27 10:44 ` fatiparty--- via Users list for the GNU Emacs text editor 2022-01-27 10:54 ` Bastian Beranek @ 2022-01-27 11:01 ` Eli Zaretskii 2022-01-27 11:43 ` fatiparty--- via Users list for the GNU Emacs text editor ` (2 more replies) 1 sibling, 3 replies; 47+ messages in thread From: Eli Zaretskii @ 2022-01-27 11:01 UTC (permalink / raw) To: help-gnu-emacs > Date: Thu, 27 Jan 2022 11:44:14 +0100 (CET) > From: fatiparty@tutanota.com > Cc: Help Gnu Emacs <help-gnu-emacs@gnu.org> > > >> Would you know what colour bit would the 88 colours correspond to? > >> > > > > Sorry, I don't understand: what do you mean by "colour bit" here? > > > > I mean the pixel depth > > 4-bit, 16 colours > 8-bit, 256 colours > 16-bit, 65,000 colours There's no meaningful number of pixels that correspond to 88 colors, AFAIK. The number of colors supported by text-mode terminals doesn't necessarily depend on the pixel depth of the color display. ^ permalink raw reply [flat|nested] 47+ messages in thread
* min-colors 88 2022-01-27 11:01 ` Eli Zaretskii @ 2022-01-27 11:43 ` fatiparty--- via Users list for the GNU Emacs text editor 2022-01-27 11:49 ` Eli Zaretskii 2022-01-27 12:59 ` Emanuel Berg via Users list for the GNU Emacs text editor 2022-01-27 11:47 ` fatiparty--- via Users list for the GNU Emacs text editor 2022-01-27 11:59 ` Emanuel Berg via Users list for the GNU Emacs text editor 2 siblings, 2 replies; 47+ messages in thread From: fatiparty--- via Users list for the GNU Emacs text editor @ 2022-01-27 11:43 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Help Gnu Emacs Jan 27, 2022, 23:01 by eliz@gnu.org: >> Date: Thu, 27 Jan 2022 11:44:14 +0100 (CET) >> From: fatiparty@tutanota.com >> Cc: Help Gnu Emacs <help-gnu-emacs@gnu.org> >> >> >> Would you know what colour bit would the 88 colours correspond to? >> >> >> > >> > Sorry, I don't understand: what do you mean by "colour bit" here? >> > >> >> I mean the pixel depth >> >> 4-bit, 16 colours >> 8-bit, 256 colours >> 16-bit, 65,000 colours >> > > There's no meaningful number of pixels that correspond to 88 colors, > AFAIK. The number of colors supported by text-mode terminals doesn't > necessarily depend on the pixel depth of the color display. > So one uses whatever bit format (e.g. 24-Bit Format for #RRGGBB) needed to store the maximum colours supported? ^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: min-colors 88 2022-01-27 11:43 ` fatiparty--- via Users list for the GNU Emacs text editor @ 2022-01-27 11:49 ` Eli Zaretskii 2022-01-27 12:27 ` Emanuel Berg via Users list for the GNU Emacs text editor 2022-01-27 12:59 ` Emanuel Berg via Users list for the GNU Emacs text editor 1 sibling, 1 reply; 47+ messages in thread From: Eli Zaretskii @ 2022-01-27 11:49 UTC (permalink / raw) To: help-gnu-emacs > Date: Thu, 27 Jan 2022 12:43:04 +0100 (CET) > From: fatiparty@tutanota.com > Cc: Help Gnu Emacs <help-gnu-emacs@gnu.org> > > Jan 27, 2022, 23:01 by eliz@gnu.org: > > >> 4-bit, 16 colours > >> 8-bit, 256 colours > >> 16-bit, 65,000 colours > >> > > > > There's no meaningful number of pixels that correspond to 88 colors, > > AFAIK. The number of colors supported by text-mode terminals doesn't > > necessarily depend on the pixel depth of the color display. > > > So one uses whatever bit format (e.g. 24-Bit Format for #RRGGBB) needed > to store the maximum colours supported? Yes. And you can use #RRGGBB (or any variant of it) regardless of the pixel depth, Emacs will convert as needed. ^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: min-colors 88 2022-01-27 11:49 ` Eli Zaretskii @ 2022-01-27 12:27 ` Emanuel Berg via Users list for the GNU Emacs text editor 0 siblings, 0 replies; 47+ messages in thread From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-01-27 12:27 UTC (permalink / raw) To: help-gnu-emacs Eli Zaretskii wrote: >>>> 4-bit, 16 colours >>>> 8-bit, 256 colours >>>> 16-bit, 65 000 colours >>> >>> There's no meaningful number of pixels that correspond to >>> 88 colors, AFAIK. The number of colors supported by >>> text-mode terminals doesn't necessarily depend on the >>> pixel depth of the color display. >> >> So one uses whatever bit format (e.g. 24-Bit Format for >> #RRGGBB) needed to store the maximum colours supported? > > Yes. And you can use #RRGGBB (or any variant of it) > regardless of the pixel depth, Emacs will convert as needed. Compare ... Got to the ttys/Linux VTs/the console ... $ tput colors 8 I actually there are 16 colors in the VTs, 8 is just what is reported so it tells you that. See "test-colors", line 56: https://dataswamp.org/~incal/conf/.zsh/colors screenshot: https://dataswamp.org/~incal/figures/shell/test-colors.png It is 8 colors _and_ 8 supposedly bright versions of the corresponding colors, but they can be defined to whatever, and it happens the same way, so there is in practice 16 colors. (Only when the background comes into play it differs, since the 8 bright version cannot, I think, be used as backgrounds.) I have a very old tutorial somewhere on this ... PS. BTW Double-O Seven, in the computer world it is spelled "color". -- underground experts united https://dataswamp.org/~incal ^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: min-colors 88 2022-01-27 11:43 ` fatiparty--- via Users list for the GNU Emacs text editor 2022-01-27 11:49 ` Eli Zaretskii @ 2022-01-27 12:59 ` Emanuel Berg via Users list for the GNU Emacs text editor 1 sibling, 0 replies; 47+ messages in thread From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-01-27 12:59 UTC (permalink / raw) To: help-gnu-emacs fatiparty--- via Users list for the GNU Emacs text editor wrote: > So one uses whatever bit format (e.g. 24-Bit Format for > #RRGGBB) needed to store the maximum colours supported? Total number of colors expressible by the hexadecimal #RRGGBB notation: $ echo $(( ((16 - 1)*16**1 + (16 - 1)*16**0 + 1)**3 )) 16 777 216 So the max value is: $ dec2bin $(( 16 777 216 - 1 )) # [1] 11111111 11111111 11111111 which is 3*8 = 24 bits. (Spaces added for clarity.) [1] https://dataswamp.org/~incal/conf/.zsh/math -- underground experts united https://dataswamp.org/~incal ^ permalink raw reply [flat|nested] 47+ messages in thread
* min-colors 88 2022-01-27 11:01 ` Eli Zaretskii 2022-01-27 11:43 ` fatiparty--- via Users list for the GNU Emacs text editor @ 2022-01-27 11:47 ` fatiparty--- via Users list for the GNU Emacs text editor 2022-01-27 11:50 ` Eli Zaretskii 2022-01-27 11:59 ` Emanuel Berg via Users list for the GNU Emacs text editor 2 siblings, 1 reply; 47+ messages in thread From: fatiparty--- via Users list for the GNU Emacs text editor @ 2022-01-27 11:47 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Help Gnu Emacs Jan 27, 2022, 23:01 by eliz@gnu.org: >> Date: Thu, 27 Jan 2022 11:44:14 +0100 (CET) >> From: fatiparty@tutanota.com >> Cc: Help Gnu Emacs <help-gnu-emacs@gnu.org> >> >> >> Would you know what colour bit would the 88 colours correspond to? >> >> >> > >> > Sorry, I don't understand: what do you mean by "colour bit" here? >> > >> >> I mean the pixel depth >> >> 4-bit, 16 colours >> 8-bit, 256 colours >> 16-bit, 65,000 colours >> > > There's no meaningful number of pixels that correspond to 88 colors, > AFAIK. The number of colors supported by text-mode terminals doesn't > necessarily depend on the pixel depth of the color display. > For the case of RGB, would that mean 88 values for each base colour (R,G,B)? ^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: min-colors 88 2022-01-27 11:47 ` fatiparty--- via Users list for the GNU Emacs text editor @ 2022-01-27 11:50 ` Eli Zaretskii 2022-01-27 13:00 ` Emanuel Berg via Users list for the GNU Emacs text editor 2022-01-27 13:03 ` fatiparty--- via Users list for the GNU Emacs text editor 0 siblings, 2 replies; 47+ messages in thread From: Eli Zaretskii @ 2022-01-27 11:50 UTC (permalink / raw) To: help-gnu-emacs > Date: Thu, 27 Jan 2022 12:47:30 +0100 (CET) > From: fatiparty@tutanota.com > Cc: Help Gnu Emacs <help-gnu-emacs@gnu.org> > > For the case of RGB, would that mean 88 values for each base colour (R,G,B)? No, it means 88 different colors overall. ^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: min-colors 88 2022-01-27 11:50 ` Eli Zaretskii @ 2022-01-27 13:00 ` Emanuel Berg via Users list for the GNU Emacs text editor 2022-01-27 13:03 ` fatiparty--- via Users list for the GNU Emacs text editor 1 sibling, 0 replies; 47+ messages in thread From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-01-27 13:00 UTC (permalink / raw) To: help-gnu-emacs Eli Zaretskii wrote: >> For the case of RGB, would that mean 88 values for each >> base colour (R,G,B)? > > No, it means 88 different colors overall. Unless they are all set to the same color ... -- underground experts united https://dataswamp.org/~incal ^ permalink raw reply [flat|nested] 47+ messages in thread
* min-colors 88 2022-01-27 11:50 ` Eli Zaretskii 2022-01-27 13:00 ` Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-01-27 13:03 ` fatiparty--- via Users list for the GNU Emacs text editor 2022-01-27 13:33 ` Emanuel Berg via Users list for the GNU Emacs text editor 2022-01-27 15:14 ` Eli Zaretskii 1 sibling, 2 replies; 47+ messages in thread From: fatiparty--- via Users list for the GNU Emacs text editor @ 2022-01-27 13:03 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Help Gnu Emacs Jan 27, 2022, 23:50 by eliz@gnu.org: >> Date: Thu, 27 Jan 2022 12:47:30 +0100 (CET) >> From: fatiparty@tutanota.com >> Cc: Help Gnu Emacs <help-gnu-emacs@gnu.org> >> >> For the case of RGB, would that mean 88 values for each base colour (R,G,B)? >> > > No, it means 88 different colors overall. > Would you know the bit length using for each of the base colours when 88 different colours started to be used? Perhaps three 5-Bit numbers? ^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: min-colors 88 2022-01-27 13:03 ` fatiparty--- via Users list for the GNU Emacs text editor @ 2022-01-27 13:33 ` Emanuel Berg via Users list for the GNU Emacs text editor 2022-01-27 15:14 ` Eli Zaretskii 1 sibling, 0 replies; 47+ messages in thread From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-01-27 13:33 UTC (permalink / raw) To: help-gnu-emacs fatiparty--- via Users list for the GNU Emacs text editor wrote: >> No, it means 88 different colors overall. > > Would you know the bit length using for each of the base > colours when 88 different colours started to be used? > Perhaps three 5-Bit numbers? 007, see: There has also been a similar but incompatible 88-color encoding using the same escape sequence, seen in rxvt and xterm-88color. Not much is known about the scheme besides the color codes. It uses a 4×4×4 color cube. [1] AKA the "Big Eric" mode. [1] https://en.wikipedia.org/wiki/ANSI_escape_code -- underground experts united https://dataswamp.org/~incal ^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: min-colors 88 2022-01-27 13:03 ` fatiparty--- via Users list for the GNU Emacs text editor 2022-01-27 13:33 ` Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-01-27 15:14 ` Eli Zaretskii 2022-01-27 18:09 ` fatiparty--- via Users list for the GNU Emacs text editor 1 sibling, 1 reply; 47+ messages in thread From: Eli Zaretskii @ 2022-01-27 15:14 UTC (permalink / raw) To: help-gnu-emacs > Date: Thu, 27 Jan 2022 14:03:54 +0100 (CET) > From: fatiparty@tutanota.com > Cc: Help Gnu Emacs <help-gnu-emacs@gnu.org> > > > No, it means 88 different colors overall. > > > Would you know the bit length using for each of the base colours when 88 different colours > started to be used? Perhaps three 5-Bit numbers? You are thinking about this in the wrong direction, AFAIU. On text-mode terminals, colors are just indices into a table, and the table itself is not exposed. How the indices are mapped to the actual colors is entirely up to the terminal emulator. So it is not useful to think about these colors in terms of bots per pixel. ^ permalink raw reply [flat|nested] 47+ messages in thread
* min-colors 88 2022-01-27 15:14 ` Eli Zaretskii @ 2022-01-27 18:09 ` fatiparty--- via Users list for the GNU Emacs text editor 2022-01-27 18:30 ` Eli Zaretskii 2022-01-27 18:42 ` Emanuel Berg via Users list for the GNU Emacs text editor 0 siblings, 2 replies; 47+ messages in thread From: fatiparty--- via Users list for the GNU Emacs text editor @ 2022-01-27 18:09 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Help Gnu Emacs Jan 28, 2022, 03:14 by eliz@gnu.org: >> Date: Thu, 27 Jan 2022 14:03:54 +0100 (CET) >> From: fatiparty@tutanota.com >> Cc: Help Gnu Emacs <help-gnu-emacs@gnu.org> >> >> > No, it means 88 different colors overall. >> > >> Would you know the bit length using for each of the base colours when 88 different colours >> started to be used? Perhaps three 5-Bit numbers? >> > > You are thinking about this in the wrong direction, AFAIU. On > text-mode terminals, colors are just indices into a table, and the > table itself is not exposed. How the indices are mapped to the actual > colors is entirely up to the terminal emulator. So it is not useful > to think about these colors in terms of bots per pixel. > I could be mistaking the interpretation of the hex-codes to the number of colours available. ^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: min-colors 88 2022-01-27 18:09 ` fatiparty--- via Users list for the GNU Emacs text editor @ 2022-01-27 18:30 ` Eli Zaretskii 2022-01-27 18:43 ` Emanuel Berg via Users list for the GNU Emacs text editor ` (2 more replies) 2022-01-27 18:42 ` Emanuel Berg via Users list for the GNU Emacs text editor 1 sibling, 3 replies; 47+ messages in thread From: Eli Zaretskii @ 2022-01-27 18:30 UTC (permalink / raw) To: help-gnu-emacs > Date: Thu, 27 Jan 2022 19:09:34 +0100 (CET) > From: fatiparty@tutanota.com > Cc: Help Gnu Emacs <help-gnu-emacs@gnu.org> > > > You are thinking about this in the wrong direction, AFAIU. On > > text-mode terminals, colors are just indices into a table, and the > > table itself is not exposed. How the indices are mapped to the actual > > colors is entirely up to the terminal emulator. So it is not useful > > to think about these colors in terms of bots per pixel. > > > I could be mistaking the interpretation of the hex-codes to the number of colours > available. Which hex-codes? ^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: min-colors 88 2022-01-27 18:30 ` Eli Zaretskii @ 2022-01-27 18:43 ` Emanuel Berg via Users list for the GNU Emacs text editor 2022-01-27 18:46 ` fatiparty--- via Users list for the GNU Emacs text editor 2022-01-27 18:47 ` Emanuel Berg via Users list for the GNU Emacs text editor 2 siblings, 0 replies; 47+ messages in thread From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-01-27 18:43 UTC (permalink / raw) To: help-gnu-emacs Eli Zaretskii wrote: > Which hex-codes? #RRGGBB -- underground experts united https://dataswamp.org/~incal ^ permalink raw reply [flat|nested] 47+ messages in thread
* min-colors 88 2022-01-27 18:30 ` Eli Zaretskii 2022-01-27 18:43 ` Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-01-27 18:46 ` fatiparty--- via Users list for the GNU Emacs text editor 2022-01-27 19:46 ` Eli Zaretskii 2022-01-27 18:47 ` Emanuel Berg via Users list for the GNU Emacs text editor 2 siblings, 1 reply; 47+ messages in thread From: fatiparty--- via Users list for the GNU Emacs text editor @ 2022-01-27 18:46 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Help Gnu Emacs Jan 28, 2022, 06:30 by eliz@gnu.org: >> Date: Thu, 27 Jan 2022 19:09:34 +0100 (CET) >> From: fatiparty@tutanota.com >> Cc: Help Gnu Emacs <help-gnu-emacs@gnu.org> >> >> > You are thinking about this in the wrong direction, AFAIU. On >> > text-mode terminals, colors are just indices into a table, and the >> > table itself is not exposed. How the indices are mapped to the actual >> > colors is entirely up to the terminal emulator. So it is not useful >> > to think about these colors in terms of bots per pixel. >> > >> I could be mistaking the interpretation of the hex-codes to the number of colours >> available. >> > > Which hex-codes? > For instance #RRGGBB, #RRRRGGGGBBBB. As I understand there is no relation between thu possibilities provided by the hex-codes and the lookup table of actual colours that can be rendered. ^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: min-colors 88 2022-01-27 18:46 ` fatiparty--- via Users list for the GNU Emacs text editor @ 2022-01-27 19:46 ` Eli Zaretskii 0 siblings, 0 replies; 47+ messages in thread From: Eli Zaretskii @ 2022-01-27 19:46 UTC (permalink / raw) To: help-gnu-emacs > Date: Thu, 27 Jan 2022 19:46:09 +0100 (CET) > From: fatiparty@tutanota.com > Cc: Help Gnu Emacs <help-gnu-emacs@gnu.org> > > For instance #RRGGBB, #RRRRGGGGBBBB. As I understand there is no relation > between thu possibilities provided by the hex-codes and the lookup table of actual > colours that can be rendered. The relation is established at startup, you can see the code in xterm.el. ^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: min-colors 88 2022-01-27 18:30 ` Eli Zaretskii 2022-01-27 18:43 ` Emanuel Berg via Users list for the GNU Emacs text editor 2022-01-27 18:46 ` fatiparty--- via Users list for the GNU Emacs text editor @ 2022-01-27 18:47 ` Emanuel Berg via Users list for the GNU Emacs text editor 2022-01-28 7:58 ` fatiparty--- via Users list for the GNU Emacs text editor 2 siblings, 1 reply; 47+ messages in thread From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-01-27 18:47 UTC (permalink / raw) To: help-gnu-emacs >>> You are thinking about this in the wrong direction, AFAIU. >>> On text-mode terminals, colors are just indices into >>> a table, and the table itself is not exposed. How the >>> indices are mapped to the actual colors is entirely up to >>> the terminal emulator. So it is not useful to think about >>> these colors in terms of bots per pixel. >> >> I could be mistaking the interpretation of the hex-codes to >> the number of colours available. There are $ echo $(( (16**2)**3 )) 16 777 216 to choose the 16 (or 88 in your case perhaps) from. -- underground experts united https://dataswamp.org/~incal ^ permalink raw reply [flat|nested] 47+ messages in thread
* min-colors 88 2022-01-27 18:47 ` Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-01-28 7:58 ` fatiparty--- via Users list for the GNU Emacs text editor 2022-01-28 8:07 ` Eli Zaretskii 2022-01-28 21:21 ` Emanuel Berg via Users list for the GNU Emacs text editor 0 siblings, 2 replies; 47+ messages in thread From: fatiparty--- via Users list for the GNU Emacs text editor @ 2022-01-28 7:58 UTC (permalink / raw) To: Emanuel Berg; +Cc: Help Gnu Emacs Jan 28, 2022, 06:47 by help-gnu-emacs@gnu.org: >>>> You are thinking about this in the wrong direction, AFAIU. >>>> On text-mode terminals, colors are just indices into >>>> a table, and the table itself is not exposed. How the >>>> indices are mapped to the actual colors is entirely up to >>>> the terminal emulator. So it is not useful to think about >>>> these colors in terms of bots per pixel. >>>> >>> >>> I could be mistaking the interpretation of the hex-codes to >>> the number of colours available. >>> > > There are > > $ echo $(( (16**2)**3 )) > 16 777 216 > > to choose the 16 (or 88 in your case perhaps) from. > I could then come up with a hex-code where the colour in not supported. > -- > underground experts united > https://dataswamp.org/~incal > ^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: min-colors 88 2022-01-28 7:58 ` fatiparty--- via Users list for the GNU Emacs text editor @ 2022-01-28 8:07 ` Eli Zaretskii 2022-01-28 8:59 ` fatiparty--- via Users list for the GNU Emacs text editor 2022-01-28 21:21 ` Emanuel Berg via Users list for the GNU Emacs text editor 1 sibling, 1 reply; 47+ messages in thread From: Eli Zaretskii @ 2022-01-28 8:07 UTC (permalink / raw) To: help-gnu-emacs > Date: Fri, 28 Jan 2022 08:58:13 +0100 (CET) > Cc: Help Gnu Emacs <help-gnu-emacs@gnu.org> > From: fatiparty--- via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> > > I could then come up with a hex-code where the colour in not supported. There's no such thing when colors on TTY frames are considered: Emacs automatically and transparently finds the closest color that is supported, and uses that. ^ permalink raw reply [flat|nested] 47+ messages in thread
* min-colors 88 2022-01-28 8:07 ` Eli Zaretskii @ 2022-01-28 8:59 ` fatiparty--- via Users list for the GNU Emacs text editor 2022-01-28 11:36 ` Eli Zaretskii 0 siblings, 1 reply; 47+ messages in thread From: fatiparty--- via Users list for the GNU Emacs text editor @ 2022-01-28 8:59 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Help Gnu Emacs Jan 28, 2022, 20:07 by eliz@gnu.org: >> Date: Fri, 28 Jan 2022 08:58:13 +0100 (CET) >> Cc: Help Gnu Emacs <help-gnu-emacs@gnu.org> >> From: fatiparty--- via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> >> >> I could then come up with a hex-code where the colour in not supported. >> > > There's no such thing when colors on TTY frames are considered: > Emacs automatically and transparently finds the closest color that is > supported, and uses that. > For 8-Bit (2^8=256) there are defined 16 (Basic) + 6×6×6 (Cube) + 24 (Grey) What's the situation for 24-bit RGB Codes? ^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: min-colors 88 2022-01-28 8:59 ` fatiparty--- via Users list for the GNU Emacs text editor @ 2022-01-28 11:36 ` Eli Zaretskii 2022-01-28 11:54 ` fatiparty--- via Users list for the GNU Emacs text editor 2022-01-28 12:53 ` fatiparty--- via Users list for the GNU Emacs text editor 0 siblings, 2 replies; 47+ messages in thread From: Eli Zaretskii @ 2022-01-28 11:36 UTC (permalink / raw) To: help-gnu-emacs > Date: Fri, 28 Jan 2022 09:59:34 +0100 (CET) > From: fatiparty@tutanota.com > Cc: Help Gnu Emacs <help-gnu-emacs@gnu.org> > > Jan 28, 2022, 20:07 by eliz@gnu.org: > > >> I could then come up with a hex-code where the colour in not supported. > >> > > > > There's no such thing when colors on TTY frames are considered: > > Emacs automatically and transparently finds the closest color that is > > supported, and uses that. > > > For 8-Bit (2^8=256) there are defined 16 (Basic) + 6×6×6 (Cube) + 24 (Grey) > > What's the situation for 24-bit RGB Codes? What do you mean by "defined" in this context? The colors "defined" for TTY frames are set up in tty-colors.el, and they don't depend on the number of colors that the terminal actually supports. ^ permalink raw reply [flat|nested] 47+ messages in thread
* min-colors 88 2022-01-28 11:36 ` Eli Zaretskii @ 2022-01-28 11:54 ` fatiparty--- via Users list for the GNU Emacs text editor 2022-01-28 12:16 ` Eli Zaretskii 2022-01-28 12:53 ` fatiparty--- via Users list for the GNU Emacs text editor 1 sibling, 1 reply; 47+ messages in thread From: fatiparty--- via Users list for the GNU Emacs text editor @ 2022-01-28 11:54 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Help Gnu Emacs Jan 28, 2022, 23:36 by eliz@gnu.org: >> Date: Fri, 28 Jan 2022 09:59:34 +0100 (CET) >> From: fatiparty@tutanota.com >> Cc: Help Gnu Emacs <help-gnu-emacs@gnu.org> >> >> Jan 28, 2022, 20:07 by eliz@gnu.org: >> >> >> I could then come up with a hex-code where the colour in not supported. >> >> >> > >> > There's no such thing when colors on TTY frames are considered: >> > Emacs automatically and transparently finds the closest color that is >> > supported, and uses that. >> > >> For 8-Bit (2^8=256) there are defined 16 (Basic) + 6×6×6 (Cube) + 24 (Grey) >> >> What's the situation for 24-bit RGB Codes? >> > > What do you mean by "defined" in this context? > For instance I can invent a code #d166ff ( ((class color) (min-colors 88) (background dark)) :foreground "#d166ff" ) That would not mean that #d166ff actually exists for 256 colour availability. > The colors "defined" for TTY frames are set up in tty-colors.el, and > they don't depend on the number of colors that the terminal actually > supports. > ^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: min-colors 88 2022-01-28 11:54 ` fatiparty--- via Users list for the GNU Emacs text editor @ 2022-01-28 12:16 ` Eli Zaretskii 2022-01-28 12:55 ` fatiparty--- via Users list for the GNU Emacs text editor [not found] ` <MuVkMCN--3-2@tutanota.com-MuVxLzA----2> 0 siblings, 2 replies; 47+ messages in thread From: Eli Zaretskii @ 2022-01-28 12:16 UTC (permalink / raw) To: help-gnu-emacs > Date: Fri, 28 Jan 2022 12:54:49 +0100 (CET) > From: fatiparty@tutanota.com > Cc: Help Gnu Emacs <help-gnu-emacs@gnu.org> > > For instance I can invent a code #d166ff > ( ((class color) (min-colors 88) (background dark)) > :foreground "#d166ff" ) > > That would not mean that #d166ff actually exists for 256 colour availability. It doesn't matter. Emacs will find a color that is the closest to that RGB value, and use it. See tty-colors.el. ^ permalink raw reply [flat|nested] 47+ messages in thread
* min-colors 88 2022-01-28 12:16 ` Eli Zaretskii @ 2022-01-28 12:55 ` fatiparty--- via Users list for the GNU Emacs text editor 2022-01-28 13:19 ` Eli Zaretskii [not found] ` <MuVkMCN--3-2@tutanota.com-MuVxLzA----2> 1 sibling, 1 reply; 47+ messages in thread From: fatiparty--- via Users list for the GNU Emacs text editor @ 2022-01-28 12:55 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Help Gnu Emacs Jan 29, 2022, 00:16 by eliz@gnu.org: >> Date: Fri, 28 Jan 2022 12:54:49 +0100 (CET) >> From: fatiparty@tutanota.com >> Cc: Help Gnu Emacs <help-gnu-emacs@gnu.org> >> >> For instance I can invent a code #d166ff >> ( ((class color) (min-colors 88) (background dark)) >> :foreground "#d166ff" ) >> >> That would not mean that #d166ff actually exists for 256 colour availability. >> > > It doesn't matter. Emacs will find a color that is the closest to > that RGB value, and use it. See tty-colors.el. > Are there more colours available than those in the color-name-rgb-alist ? ^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: min-colors 88 2022-01-28 12:55 ` fatiparty--- via Users list for the GNU Emacs text editor @ 2022-01-28 13:19 ` Eli Zaretskii 0 siblings, 0 replies; 47+ messages in thread From: Eli Zaretskii @ 2022-01-28 13:19 UTC (permalink / raw) To: help-gnu-emacs > Date: Fri, 28 Jan 2022 13:55:39 +0100 (CET) > From: fatiparty@tutanota.com > Cc: Help Gnu Emacs <help-gnu-emacs@gnu.org> > > >> That would not mean that #d166ff actually exists for 256 colour availability. > >> > > > > It doesn't matter. Emacs will find a color that is the closest to > > that RGB value, and use it. See tty-colors.el. > > > > Are there more colours available than those in the color-name-rgb-alist ? On some displays, perhaps. But why is that important? ^ permalink raw reply [flat|nested] 47+ messages in thread
[parent not found: <MuVkMCN--3-2@tutanota.com-MuVxLzA----2>]
* min-colors 88 [not found] ` <MuVkMCN--3-2@tutanota.com-MuVxLzA----2> @ 2022-01-28 13:55 ` fatiparty--- via Users list for the GNU Emacs text editor 2022-01-28 21:27 ` Emanuel Berg via Users list for the GNU Emacs text editor 0 siblings, 1 reply; 47+ messages in thread From: fatiparty--- via Users list for the GNU Emacs text editor @ 2022-01-28 13:55 UTC (permalink / raw) To: Fatiparty; +Cc: Eli Zaretskii, Help Gnu Emacs Jan 29, 2022, 00:55 by help-gnu-emacs@gnu.org: > Jan 29, 2022, 00:16 by eliz@gnu.org: > >>> Date: Fri, 28 Jan 2022 12:54:49 +0100 (CET) >>> From: fatiparty@tutanota.com >>> Cc: Help Gnu Emacs <help-gnu-emacs@gnu.org> >>> >>> For instance I can invent a code #d166ff >>> ( ((class color) (min-colors 88) (background dark)) >>> :foreground "#d166ff" ) >>> >>> That would not mean that #d166ff actually exists for 256 colour availability. >>> >> >> It doesn't matter. Emacs will find a color that is the closest to >> that RGB value, and use it. See tty-colors.el. >> > > Are there more colours available than those in the color-name-rgb-alist ? > I have called xdpyinfo, getting (1, 4, 8, 15, 16, 24, 32) xdpyinfo | awk '$1=="depth" && sub(/,$/, "", $2) {print $2}' ^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: min-colors 88 2022-01-28 13:55 ` fatiparty--- via Users list for the GNU Emacs text editor @ 2022-01-28 21:27 ` Emanuel Berg via Users list for the GNU Emacs text editor 0 siblings, 0 replies; 47+ messages in thread From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-01-28 21:27 UTC (permalink / raw) To: help-gnu-emacs fatiparty--- via Users list for the GNU Emacs text editor wrote: > I have called xdpyinfo, getting (1, 4, 8, 15, 16, 24, 32) > > xdpyinfo | awk '$1=="depth" && sub(/,$/, "", $2) {print $2}' I have something similar, $ xdpyinfo -d ":0" | awk '/of root/{print $5}' 24 I'll add yours to it :) https://dataswamp.org/~incal/conf/.zsh/x -- underground experts united https://dataswamp.org/~incal ^ permalink raw reply [flat|nested] 47+ messages in thread
* min-colors 88 2022-01-28 11:36 ` Eli Zaretskii 2022-01-28 11:54 ` fatiparty--- via Users list for the GNU Emacs text editor @ 2022-01-28 12:53 ` fatiparty--- via Users list for the GNU Emacs text editor 2022-01-28 13:17 ` Eli Zaretskii 1 sibling, 1 reply; 47+ messages in thread From: fatiparty--- via Users list for the GNU Emacs text editor @ 2022-01-28 12:53 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Help Gnu Emacs Jan 28, 2022, 23:36 by eliz@gnu.org: >> Date: Fri, 28 Jan 2022 09:59:34 +0100 (CET) >> From: fatiparty@tutanota.com >> Cc: Help Gnu Emacs <help-gnu-emacs@gnu.org> >> >> Jan 28, 2022, 20:07 by eliz@gnu.org: >> >> >> I could then come up with a hex-code where the colour in not supported. >> >> >> > >> > There's no such thing when colors on TTY frames are considered: >> > Emacs automatically and transparently finds the closest color that is >> > supported, and uses that. >> > >> For 8-Bit (2^8=256) there are defined 16 (Basic) + 6×6×6 (Cube) + 24 (Grey) >> >> What's the situation for 24-bit RGB Codes? >> > > What do you mean by "defined" in this context? > > The colors "defined" for TTY frames are set up in tty-colors.el, and > they don't depend on the number of colors that the terminal actually > supports. > Looking at tty-colors.el, a 16-bit values is being used for each of the three colours (R[0-65535] , G[0-65535] , B[0-65535]). Giving more possibilities than 24-bit total values (with 8-bit values for each of the three colours. tty-color-define (w32console.el) passes each supported color, its index, and its RGB values. In tty-color-define, each one of the RGB components is a number between 0 and 65535 (16bit). But unsure how many get passed to tty-color-define. There is nothing specified in the .c files about this. ^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: min-colors 88 2022-01-28 12:53 ` fatiparty--- via Users list for the GNU Emacs text editor @ 2022-01-28 13:17 ` Eli Zaretskii 2022-01-28 13:49 ` fatiparty--- via Users list for the GNU Emacs text editor 0 siblings, 1 reply; 47+ messages in thread From: Eli Zaretskii @ 2022-01-28 13:17 UTC (permalink / raw) To: help-gnu-emacs > Date: Fri, 28 Jan 2022 13:53:10 +0100 (CET) > From: fatiparty@tutanota.com > Cc: Help Gnu Emacs <help-gnu-emacs@gnu.org> > > > The colors "defined" for TTY frames are set up in tty-colors.el, and > > they don't depend on the number of colors that the terminal actually > > supports. > > > Looking at tty-colors.el, a 16-bit values is being used for each of the three colours > (R[0-65535] , G[0-65535] , B[0-65535]). Giving more possibilities than 24-bit total values > (with 8-bit values for each of the three colours. > > tty-color-define (w32console.el) passes each supported color, its index, and its RGB values. > > In tty-color-define, each one of the RGB components is a number between 0 and 65535 (16bit). > > But unsure how many get passed to tty-color-define. There is nothing specified in the .c files > about this. What exactly is the question you want to ask? Or what is the problem you are trying to solve? And how are the above observations related to those questions/problems? ^ permalink raw reply [flat|nested] 47+ messages in thread
* min-colors 88 2022-01-28 13:17 ` Eli Zaretskii @ 2022-01-28 13:49 ` fatiparty--- via Users list for the GNU Emacs text editor 2022-01-28 14:34 ` Eli Zaretskii 0 siblings, 1 reply; 47+ messages in thread From: fatiparty--- via Users list for the GNU Emacs text editor @ 2022-01-28 13:49 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Help Gnu Emacs Jan 29, 2022, 01:17 by eliz@gnu.org: >> Date: Fri, 28 Jan 2022 13:53:10 +0100 (CET) >> From: fatiparty@tutanota.com >> Cc: Help Gnu Emacs <help-gnu-emacs@gnu.org> >> >> > The colors "defined" for TTY frames are set up in tty-colors.el, and >> > they don't depend on the number of colors that the terminal actually >> > supports. >> > >> Looking at tty-colors.el, a 16-bit values is being used for each of the three colours >> (R[0-65535] , G[0-65535] , B[0-65535]). Giving more possibilities than 24-bit total values >> (with 8-bit values for each of the three colours. >> >> tty-color-define (w32console.el) passes each supported color, its index, and its RGB values. >> >> In tty-color-define, each one of the RGB components is a number between 0 and 65535 (16bit). >> >> But unsure how many get passed to tty-color-define. There is nothing specified in the .c files >> about this. >> > > What exactly is the question you want to ask? Or what is the problem > you are trying to solve? And how are the above observations related > to those questions/problems? > You have clarified a lot of things. I am trying to figure out the actual list of properly defined code values for colours, and how many exist if one counts them. Is there some command that actually lists them? Does emacs only know of the named colour list, or can it use other ones which are unnamed? ^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: min-colors 88 2022-01-28 13:49 ` fatiparty--- via Users list for the GNU Emacs text editor @ 2022-01-28 14:34 ` Eli Zaretskii 2022-01-28 15:12 ` fatiparty--- via Users list for the GNU Emacs text editor 0 siblings, 1 reply; 47+ messages in thread From: Eli Zaretskii @ 2022-01-28 14:34 UTC (permalink / raw) To: help-gnu-emacs > Date: Fri, 28 Jan 2022 14:49:11 +0100 (CET) > From: fatiparty@tutanota.com > Cc: Help Gnu Emacs <help-gnu-emacs@gnu.org> > > > What exactly is the question you want to ask? Or what is the problem > > you are trying to solve? And how are the above observations related > > to those questions/problems? > > > You have clarified a lot of things. I am trying to figure out the actual list of properly defined > code values for colours, and how many exist if one counts them. Is there some command > that actually lists them? Which set of colors do you want to count? Does "M-x list-colors-display" give you what you want? If not, why not? > Does emacs only know of the named colour list, or can it use other ones which are unnamed? If you mean specifying colors by their RGB values, that is exactly what tty-colors.el does. But I'm not sure I understood the question. ^ permalink raw reply [flat|nested] 47+ messages in thread
* min-colors 88 2022-01-28 14:34 ` Eli Zaretskii @ 2022-01-28 15:12 ` fatiparty--- via Users list for the GNU Emacs text editor 2022-01-28 16:56 ` Eli Zaretskii 0 siblings, 1 reply; 47+ messages in thread From: fatiparty--- via Users list for the GNU Emacs text editor @ 2022-01-28 15:12 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Help Gnu Emacs Jan 29, 2022, 02:34 by eliz@gnu.org: >> Date: Fri, 28 Jan 2022 14:49:11 +0100 (CET) >> From: fatiparty@tutanota.com >> Cc: Help Gnu Emacs <help-gnu-emacs@gnu.org> >> >> > What exactly is the question you want to ask? Or what is the problem >> > you are trying to solve? And how are the above observations related >> > to those questions/problems? >> > >> You have clarified a lot of things. I am trying to figure out the actual list of properly defined >> code values for colours, and how many exist if one counts them. Is there some command >> that actually lists them? >> > > Which set of colors do you want to count? Does "M-x list-colors-display" > give you what you want? If not, why not? > You mentioned that Emacs will find a color that is the closest to the RGB value supplied. I am referring to the list of colours that Emacs uses to color-match the arbitrary RGB user-value supplied.Supposedly there is a list of colours that emacs uses for matching against. Is the full list defined by color-name-rgb-alist. Or are they supplied by hardware calls, or additional ones with no specific name? >> Does emacs only know of the named colour list, or can it use other ones which are unnamed? >> > > If you mean specifying colors by their RGB values, that is exactly > what tty-colors.el does. But I'm not sure I understood the question. > ^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: min-colors 88 2022-01-28 15:12 ` fatiparty--- via Users list for the GNU Emacs text editor @ 2022-01-28 16:56 ` Eli Zaretskii 0 siblings, 0 replies; 47+ messages in thread From: Eli Zaretskii @ 2022-01-28 16:56 UTC (permalink / raw) To: help-gnu-emacs > Date: Fri, 28 Jan 2022 16:12:23 +0100 (CET) > From: fatiparty@tutanota.com > Cc: Help Gnu Emacs <help-gnu-emacs@gnu.org> > > You mentioned that Emacs will find a color that is the closest to the RGB value supplied. > I am referring to the list of colours that Emacs uses to color-match the arbitrary RGB user-value supplied.Supposedly there is a list of colours that emacs uses for matching against. Is the full list defined by > color-name-rgb-alist. Yes, color-name-rgb-alist is it. ^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: min-colors 88 2022-01-28 7:58 ` fatiparty--- via Users list for the GNU Emacs text editor 2022-01-28 8:07 ` Eli Zaretskii @ 2022-01-28 21:21 ` Emanuel Berg via Users list for the GNU Emacs text editor 1 sibling, 0 replies; 47+ messages in thread From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-01-28 21:21 UTC (permalink / raw) To: help-gnu-emacs fatiparty--- via Users list for the GNU Emacs text editor wrote: >>> I could be mistaking the interpretation of the hex-codes to >>> the number of colours available. >> >> There are >> >> $ echo $(( (16**2)**3 )) >> 16 777 216 >> >> to choose the 16 (or 88 in your case perhaps) from. > > I could then come up with a hex-code where the colour in > not supported. Usually when you use them you refer to the 16 (or 88) assigned colors, not hex #RRGGBB numbers. But if you do, either it won't work or it'll have to be rounded to a color that _is_ assigned and available. -- underground experts united https://dataswamp.org/~incal ^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: min-colors 88 2022-01-27 18:09 ` fatiparty--- via Users list for the GNU Emacs text editor 2022-01-27 18:30 ` Eli Zaretskii @ 2022-01-27 18:42 ` Emanuel Berg via Users list for the GNU Emacs text editor 1 sibling, 0 replies; 47+ messages in thread From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-01-27 18:42 UTC (permalink / raw) To: help-gnu-emacs fatiparty--- via Users list for the GNU Emacs text editor wrote: > I could be mistaking the interpretation of the hex-codes to > the number of colours available. Notation: #RRGGBB Each channel: 1 byte = 8 bits e.g., say "winter blue" is #385d7d, that is binary 111000 1011101 1111101 As you see, there are (16^2)^3 = 16 777 216 colors available! (or computed from the 24-bit binary, 2^24 = the same) However, in _another_ sense there are (or can be) just 8 colors available, and 8 bright versions of them! Here are, for example, mine! I have them in a tailored file so they are easy to see and edit, they are then processed to the less-palatable original Linux format, and the colors appear in the ttys/Linux VTs/the console. So the file: normal bright bk r g y bl m c w bk r g y bl m c w r 0 255 0 190 100 180 0 150 115 255 0 255 125 250 90 210 g 0 50 155 190 100 105 180 150 115 80 185 127 125 90 255 180 b 0 50 0 0 255 0 180 150 115 80 0 0 255 250 255 140 See, there are 8 colors! ........ OK, 16 then! But you also see that each channel is 0-255. So then we are back at 256^3 = 16 777 216 colors available! -- underground experts united https://dataswamp.org/~incal ^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: min-colors 88 2022-01-27 11:01 ` Eli Zaretskii 2022-01-27 11:43 ` fatiparty--- via Users list for the GNU Emacs text editor 2022-01-27 11:47 ` fatiparty--- via Users list for the GNU Emacs text editor @ 2022-01-27 11:59 ` Emanuel Berg via Users list for the GNU Emacs text editor 2 siblings, 0 replies; 47+ messages in thread From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-01-27 11:59 UTC (permalink / raw) To: help-gnu-emacs Eli Zaretskii wrote: > There's no meaningful number of pixels that correspond to 88 > colors, AFAIK. The number of colors supported by text-mode > terminals doesn't necessarily depend on the pixel depth of > the color display. Here is a reference to 88: https://manualzz.com/doc/2019435/amx-nxd-cv7-car-video-system-user-manual It says: Colors can be used to set the colors on buttons, sliders, and pages. The lowest color number represents the lightest color-specific display; the highest number represents the darkest display. For example, 0 represents light red, and 5 is dark red. RGB triplets and names for basic 88 colors RGB Values for all 88 Basic Colors Index No. Name Red Green Blue 00 Very Light Red 255 0 0 01 Light Red 223 0 0 02 Red 191 0 0 03 Medium Red 159 0 0 04 Dark Red 127 0 0 05 Very Dark Red 95 0 0 06 Very Light Orange 255 128 0 07 Light Orange 223 112 0 08 Orange 191 96 0 09 Medium Orange 159 80 0 10 Dark Orange 127 64 0 11 Very Dark Orange 95 48 0 12 Very Light Yellow 255 255 0 13 Light Yellow 223 223 0 14 Yellow 191 191 0 15 Medium Yellow 159 159 0 16 Dark Yellow 127 127 0 17 Very Dark Yellow 95 95 0 18 Very Light Lime 128 255 0 19 Light Lime 112 223 0 20 Lime 96 191 0 21 Medium Lime 80 159 0 22 Dark Lime 64 127 0 23 Very Dark Lime 48 95 0 24 Very Light Green 0 255 0 25 Light Green 0 223 0 26 Green 0 191 0 27 Medium Green 0 159 0 28 Dark Green 0 127 0 29 Very Dark Green 0 95 0 30 Very Light Mint 0 255 128 31 Light Mint 0 223 112 32 Mint 0 191 96 33 Medium Mint 0 159 80 34 Dark Mint 0 127 64 35 Very Dark Mint 0 95 48 7" Modero Widescreen Touch Panels 119 Programming RGB Values for all 88 Basic Colors (Cont.) 120 Index No. Name Red Green Blue 36 Very Light Cyan 0 255 255 37 Light Cyan 0 223 223 38 Cyan 0 191 191 39 Medium Cyan 0 159 159 40 Dark Cyan 0 127 127 41 Very Dark Cyan 0 95 95 42 Very Light Aqua 0 128 255 43 Light Aqua 0 112 223 44 Aqua 0 96 191 45 Medium Aqua 0 80 159 46 Dark Aqua 0 64 127 47 Very Dark Aqua 0 48 95 48 Very Light Blue 0 0 255 49 Light Blue 0 0 223 50 Blue 0 0 191 51 Medium Blue 0 0 159 52 Dark Blue 0 0 127 53 Very Dark Blue 0 0 95 54 Very Light Purple 128 0 255 55 Light Purple 112 0 223 56 Purple 96 0 191 57 Medium Purple 80 0 159 58 Dark Purple 64 0 127 59 Very Dark Purple 48 0 95 60 Very Light Magenta 255 0 255 61 Light Magenta 223 0 223 62 Magenta 191 0 191 63 Medium Magenta 159 0 159 64 Dark Magenta 127 0 127 65 Very Dark Magenta 95 0 95 66 Very Light Pink 255 0 128 67 Light Pink 223 0 112 68 Pink 191 0 96 69 Medium Pink 159 0 80 70 Dark Pink 127 0 64 71 Very Dark Pink 95 0 48 72 White 255 255 255 73 Grey1 238 238 238 74 Grey3 204 204 204 75 Grey5 170 170 170 76 Grey7 136 136 136 77 Grey9 102 102 102 78 Grey4 187 187 187 79 Grey6 153 153 153 7" Modero Widescreen Touch Panels Programming RGB Values for all 88 Basic Colors (Cont.) Index No. Name Red Green Blue 80 Grey8 119 119 119 81 Grey10 85 85 85 82 Grey12 51 51 51 83 Grey13 34 34 34 84 Grey2 221 221 221 85 Grey11 68 68 68 86 Grey14 17 17 17 87 Black 0 0 0 255 TRANSPARENT 99 53 99 -- underground experts united https://dataswamp.org/~incal ^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: min-colors 88 2022-01-27 6:46 ` Eli Zaretskii 2022-01-27 8:43 ` fatiparty--- via Users list for the GNU Emacs text editor @ 2022-01-27 11:50 ` Emanuel Berg via Users list for the GNU Emacs text editor 1 sibling, 0 replies; 47+ messages in thread From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-01-27 11:50 UTC (permalink / raw) To: help-gnu-emacs Eli Zaretskii wrote: >> I keep seeing 88 for min-colors. I wonder if a different >> number would be more appropriate, as it seems that 88 is >> quite arbitrary. > > It is not arbitrary: xterm (and its workalikes) has a mode > where it supports 88 colors. That number is enough for Emacs > to express all of the possible colors from the X repertoire, > so we use that as a threshold for "any color is supported". 88 was useful to people who went to South America after WW2 as well ... -- underground experts united https://dataswamp.org/~incal ^ permalink raw reply [flat|nested] 47+ messages in thread
end of thread, other threads:[~2022-01-28 21:27 UTC | newest] Thread overview: 47+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-01-27 6:14 min-colors 88 fatiparty--- via Users list for the GNU Emacs text editor 2022-01-27 6:33 ` Yuri Khan 2022-01-27 11:48 ` Emanuel Berg via Users list for the GNU Emacs text editor 2022-01-27 12:10 ` Emanuel Berg via Users list for the GNU Emacs text editor [not found] ` <CAP_d_8U3E=FAQJ7XiNMnCi-Y4Gneo69KmEKVTuWWHOA7EVz7Gg@mail.gmail.com-MuPEX1J--7-2> 2022-01-27 6:39 ` fatiparty--- via Users list for the GNU Emacs text editor 2022-01-27 6:46 ` Eli Zaretskii 2022-01-27 8:43 ` fatiparty--- via Users list for the GNU Emacs text editor 2022-01-27 9:56 ` Eli Zaretskii 2022-01-27 10:44 ` fatiparty--- via Users list for the GNU Emacs text editor 2022-01-27 10:54 ` Bastian Beranek 2022-01-27 11:01 ` Eli Zaretskii 2022-01-27 11:43 ` fatiparty--- via Users list for the GNU Emacs text editor 2022-01-27 11:49 ` Eli Zaretskii 2022-01-27 12:27 ` Emanuel Berg via Users list for the GNU Emacs text editor 2022-01-27 12:59 ` Emanuel Berg via Users list for the GNU Emacs text editor 2022-01-27 11:47 ` fatiparty--- via Users list for the GNU Emacs text editor 2022-01-27 11:50 ` Eli Zaretskii 2022-01-27 13:00 ` Emanuel Berg via Users list for the GNU Emacs text editor 2022-01-27 13:03 ` fatiparty--- via Users list for the GNU Emacs text editor 2022-01-27 13:33 ` Emanuel Berg via Users list for the GNU Emacs text editor 2022-01-27 15:14 ` Eli Zaretskii 2022-01-27 18:09 ` fatiparty--- via Users list for the GNU Emacs text editor 2022-01-27 18:30 ` Eli Zaretskii 2022-01-27 18:43 ` Emanuel Berg via Users list for the GNU Emacs text editor 2022-01-27 18:46 ` fatiparty--- via Users list for the GNU Emacs text editor 2022-01-27 19:46 ` Eli Zaretskii 2022-01-27 18:47 ` Emanuel Berg via Users list for the GNU Emacs text editor 2022-01-28 7:58 ` fatiparty--- via Users list for the GNU Emacs text editor 2022-01-28 8:07 ` Eli Zaretskii 2022-01-28 8:59 ` fatiparty--- via Users list for the GNU Emacs text editor 2022-01-28 11:36 ` Eli Zaretskii 2022-01-28 11:54 ` fatiparty--- via Users list for the GNU Emacs text editor 2022-01-28 12:16 ` Eli Zaretskii 2022-01-28 12:55 ` fatiparty--- via Users list for the GNU Emacs text editor 2022-01-28 13:19 ` Eli Zaretskii [not found] ` <MuVkMCN--3-2@tutanota.com-MuVxLzA----2> 2022-01-28 13:55 ` fatiparty--- via Users list for the GNU Emacs text editor 2022-01-28 21:27 ` Emanuel Berg via Users list for the GNU Emacs text editor 2022-01-28 12:53 ` fatiparty--- via Users list for the GNU Emacs text editor 2022-01-28 13:17 ` Eli Zaretskii 2022-01-28 13:49 ` fatiparty--- via Users list for the GNU Emacs text editor 2022-01-28 14:34 ` Eli Zaretskii 2022-01-28 15:12 ` fatiparty--- via Users list for the GNU Emacs text editor 2022-01-28 16:56 ` Eli Zaretskii 2022-01-28 21:21 ` Emanuel Berg via Users list for the GNU Emacs text editor 2022-01-27 18:42 ` Emanuel Berg via Users list for the GNU Emacs text editor 2022-01-27 11:59 ` Emanuel Berg via Users list for the GNU Emacs text editor 2022-01-27 11:50 ` Emanuel Berg via Users list for the GNU Emacs text editor
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.