GNU bug report logs - #39590
25.2; Inconsistent color-values return values

Previous Next

Package: emacs;

Reported by: В.Санников <vsannikov20 <at> yandex.ru>

Date: Thu, 13 Feb 2020 14:36:03 UTC

Severity: normal

Tags: fixed

Found in versions 25.2, 26.3

Fixed in version 27.1

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 39590 in the body.
You can then email your comments to 39590 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#39590; Package emacs. (Thu, 13 Feb 2020 14:36:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to В.Санников <vsannikov20 <at> yandex.ru>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 13 Feb 2020 14:36:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: В.Санников <vsannikov20 <at> yandex.ru>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.2; Inconsistent color-values return values
Date: Thu, 13 Feb 2020 16:43:00 +0300

    (color-values "white")

returns "(65535 65535 65535)" while

    (color-values "#ffffff")

returns "(65280 65280 65280)" which is very surprising, confused and
inconsistent for me. Moreover, this leads to

    (color-name-to-rgb "white")

returns "(1.00390625 1.00390625 1.00390625)" which is looks wrong
because color components must be in [0; 1]



In GNU Emacs 25.2.2 (x86_64-pc-linux-gnu, GTK+ Version 3.22.21)
 of 2017-09-22, modified by Debian built on lgw01-amd64-050
Windowing system distributor 'The X.Org Foundation', version 11.0.12005000
System Description:	Ubuntu 18.04.4 LTS

Configured using:
 'configure --build x86_64-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --with-pop=yes

--enable-locallisppath=/etc/emacs25:/etc/emacs:/usr/local/share/emacs/25.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.2/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --without-gconf --build x86_64-linux-gnu
 --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --with-pop=yes

--enable-locallisppath=/etc/emacs25:/etc/emacs:/usr/local/share/emacs/25.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.2/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --without-gconf --with-x=yes --with-x-toolkit=gtk3
 --with-toolkit-scroll-bars 'CFLAGS=-g -O2
 -fdebug-prefix-map=/build/emacs25-jYekUr/emacs25-25.2+1=. 
-fstack-protector-strong
 -Wformat -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time
 -D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro''

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY
ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11

Important settings:
  value of $LC_MONETARY: ru_RU.UTF-8
  value of $LC_NUMERIC: ru_RU.UTF-8
  value of $LC_TIME: ru_RU.UTF-8
  value of $LANG: ru_RU.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  recentf-mode: t
  global-magit-file-mode: t
  magit-auto-revert-mode: t
  global-git-commit-mode: t
  diff-auto-refine-mode: t
  async-bytecomp-package-mode: t
  savehist-mode: t
  display-time-mode: t
  global-auto-revert-mode: t
  shell-dirtrack-mode: t
  evil-mode: t
  evil-local-mode: t
  global-company-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  projectile-mode: t
  helm-mode: t
  workgroups-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
Quit
previous-line: Beginning of buffer

uncompressing faces.el.gz...done
Note: file is write protected
C-h C-g is undefined

read--expression: Command attempted to use minibuffer while in minibuffer
evil-backward-char: Beginning of line
End of line

Load-path shadows:
/usr/share/emacs25/site-lisp/cmake-data/cmake-mode hides 
/usr/share/emacs/site-lisp/cmake-mode
/usr/share/emacs/25.2/site-lisp/debian-startup hides 
/usr/share/emacs/site-lisp/debian-startup
/home/ves/.emacs.d/elpa/seq-2.20/seq hides 
/usr/share/emacs/25.2/lisp/emacs-lisp/seq
/home/ves/.emacs.d/elpa/let-alist-1.0.5/let-alist hides 
/usr/share/emacs/25.2/lisp/emacs-lisp/let-alist

Features:
(shadow sort mail-extr emacsbug sendmail quail debug cus-edit cus-start
cus-load eieio-opt speedbar sb-image ezimage dframe image-file tramp
tramp-compat tramp-loaddefs trampver ucs-normalize ffap bug-reference
misearch multi-isearch recentf tree-widget wid-edit helm-x-files
helm-for-files helm-bookmark helm-adaptive magit-bookmark bookmark pp
helm-external helm-net browse-url xml url url-proxy url-privacy
url-expand url-methods url-history url-cookie url-domsuf url-util
url-parse auth-source url-vars mailcap winner helm-command helm-elisp
helm-eval edebug helm-info dired-aux dired-hide-dotfiles company-ispell
org-element org-rmail org-mhe org-irc org-info org-gnus org-docview
doc-view jka-compr image-mode org-bibtex bibtex org-bbdb org-w3m org
org-macro org-footnote org-pcomplete org-list org-faces org-entities
noutline outline org-version ob-emacs-lisp ob ob-tangle ob-ref ob-lob
ob-table ob-exp org-src ob-keys ob-comint ob-core ob-eval org-compat
org-macs org-loaddefs find-func cal-menu calendar cal-loaddefs hideshow
cc-styles cc-align cc-engine cc-vars cc-defs evil-magit magit-submodule
magit-obsolete magit-blame magit-stash magit-reflog magit-bisect
magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit
epa magit-sequence magit-notes magit-worktree magit-tag magit-merge
magit-branch magit-reset magit-files magit-refs magit-status magit
magit-repos magit-apply magit-wip magit-log magit-diff smerge-mode
magit-core magit-autorevert magit-margin magit-transient magit-process
magit-mode derived transient git-commit magit-git magit-section
benchmark magit-utils which-func imenu vc-git diff-mode ido crm log-edit
message dired rfc822 mml mml-sec password-cache epg gnus-util mm-decode
mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums
mm-util help-fns mail-prsvr mailabbrev mail-utils gmm-utils mailheader
pcvs-util add-log with-editor async-bytecomp server subr-x savehist time
grep-a-lot autorevert filenotify evil evil-keybindings evil-integration
evil-maps evil-commands reveal flyspell ispell evil-jumps
evil-command-window evil-types evil-search evil-ex shell pcomplete
evil-macros evil-repeat evil-states evil-core evil-common rect
evil-digraphs evil-vars company-oddmuse company-keywords company-etags
company-gtags company-dabbrev-code company-dabbrev company-files
company-capf company-cmake company-xcode company-clang company-semantic
company-eclim company-template company-css company-nxml company-bbdb
company elisp-format helm-etags-plus etags xref project
smart-mode-line-respectful-theme smart-mode-line rich-minority
solarized-light-theme solarized solarized-faces solarized-palettes color
highlight-parentheses goto-chg undo-tree diff jumplist buffer-move
windmove projectile grep compile comint ansi-color ibuf-ext ibuffer
thingatpt helm-mode helm-files helm-buffers helm-occur helm-tags
helm-locate helm-grep helm-regexp format-spec helm-utils helm-help
helm-types helm easy-mmode helm-source eieio-compat eieio eieio-core
helm-multi-match helm-lib async workgroups2 advice cl-seq cl-macs
edmacro kmacro anaphora ring f dash s finder-inf tex-site info package
epg-config seq byte-opt gv bytecomp byte-compile cl-extra help-mode
easymenu cconv cl-loaddefs pcase cl-lib time-date mule-util cyril-util
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote dbusbind inotify dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty make-network-process emacs)

Memory information:
((conses 16 1024038 198976)
 (symbols 48 68161 0)
 (miscs 40 2122 463)
 (strings 32 226401 5541)
 (string-bytes 1 6174022)
 (vectors 16 90340)
 (vector-slots 8 1945204 174528)
 (floats 8 1157 276)
 (intervals 56 7471 3780)
 (buffers 976 88))

-- 
Вячеслав Санников
инженер-программист
ЛПО НТЦ МКС
Концерн "Автоматика"




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39590; Package emacs. (Thu, 13 Feb 2020 15:47:02 GMT) Full text and rfc822 format available.

Message #8 received at 39590 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: В.Санников <vsannikov20 <at> yandex.ru>
Cc: 39590 <at> debbugs.gnu.org
Subject: Re: bug#39590: 25.2; Inconsistent color-values return values
Date: Thu, 13 Feb 2020 17:46:18 +0200
> From: В.Санников
>  <vsannikov20 <at> yandex.ru>
> Date: Thu, 13 Feb 2020 16:43:00 +0300
> 
>      (color-values "white")
> 
> returns "(65535 65535 65535)" while
> 
>      (color-values "#ffffff")
> 
> returns "(65280 65280 65280)" which is very surprising, confused and
> inconsistent for me. Moreover, this leads to
> 
>      (color-name-to-rgb "white")
> 
> returns "(1.00390625 1.00390625 1.00390625)" which is looks wrong
> because color components must be in [0; 1]

This was changed for Emacs 27, which I think behaves as you want.
Please try the latest emacs-27 branch of the Emacs Git repository.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39590; Package emacs. (Wed, 26 Feb 2020 12:54:01 GMT) Full text and rfc822 format available.

Message #11 received at 39590 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: В.Санников <vsannikov20 <at> yandex.ru>
Cc: 39590 <at> debbugs.gnu.org
Subject: Re: bug#39590: 25.2; Inconsistent color-values return values
Date: Wed, 26 Feb 2020 07:53:38 -0500
found 39590 26.3
tags 39590 fixed
close 39590 27.1
quit

В.Санников <vsannikov20 <at> yandex.ru> writes:

>     (color-values "#ffffff")
>
> returns "(65280 65280 65280)"

This happens in 26.3 as well.

>     (color-name-to-rgb "white")
>
> returns "(1.00390625 1.00390625 1.00390625)"

Although this one does not (I get (1.0 1.0 1.0) there).  Both cases are
fixed in emacs-27.




bug Marked as found in versions 26.3. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 26 Feb 2020 12:54:02 GMT) Full text and rfc822 format available.

Added tag(s) fixed. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 26 Feb 2020 12:54:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 27.1, send any further explanations to 39590 <at> debbugs.gnu.org and В.Санников <vsannikov20 <at> yandex.ru> Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 26 Feb 2020 12:54:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 26 Mar 2020 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 32 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.