emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 9fc935f: Use 65535 as color-values scale value in the NS backend


From: Mattias Engdegård
Subject: master 9fc935f: Use 65535 as color-values scale value in the NS backend
Date: Sun, 7 Jun 2020 04:38:57 -0400 (EDT)

branch: master
commit 9fc935f1225f75eb36091060b02a583cf32ff30c
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>

    Use 65535 as color-values scale value in the NS backend
    
    * src/nsfns.m (Fxw_color_values): Scale with 65535 instead of 65280, for
    uniformity with other backends.
    * lisp/faces.el (color-values): Update doc string.
    * doc/lispref/frames.texi (Color Names): Update examples.
---
 doc/lispref/frames.texi | 6 +++---
 lisp/faces.el           | 2 +-
 src/nsfns.m             | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi
index 6bf5db2..966f620 100644
--- a/doc/lispref/frames.texi
+++ b/doc/lispref/frames.texi
@@ -3975,11 +3975,11 @@ If @var{color} is not defined, the value is @code{nil}.
 (color-values "black")
      @result{} (0 0 0)
 (color-values "white")
-     @result{} (65280 65280 65280)
+     @result{} (65535 65535 65535)
 (color-values "red")
-     @result{} (65280 0 0)
+     @result{} (65535 0 0)
 (color-values "pink")
-     @result{} (65280 49152 51968)
+     @result{} (65535 49344 52171)
 (color-values "hungry")
      @result{} nil
 @end example
diff --git a/lisp/faces.el b/lisp/faces.el
index e707f6f..f4a9ded 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -1822,7 +1822,7 @@ COLOR should be a string naming a color (e.g. \"white\"), 
or a
 string specifying a color's RGB components (e.g. \"#ff12ec\").
 
 Return a list of three integers, (RED GREEN BLUE), each between 0
-and either 65280 or 65535 (the maximum depends on the system).
+and 65535 inclusive.
 Use `color-name-to-rgb' if you want RGB floating-point values
 normalized to 1.0.
 
diff --git a/src/nsfns.m b/src/nsfns.m
index 273fb5f..628233e 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -2329,8 +2329,8 @@ DEFUN ("xw-color-values", Fxw_color_values, 
Sxw_color_values, 1, 2, 0,
   [[col colorUsingDefaultColorSpace]
         getRed: &red green: &green blue: &blue alpha: &alpha];
   unblock_input ();
-  return list3i (lrint (red * 65280), lrint (green * 65280),
-                lrint (blue * 65280));
+  return list3i (lrint (red * 65535), lrint (green * 65535),
+                lrint (blue * 65535));
 }
 
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]