Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
f9b1200f
Commit
f9b1200f
authored
Sep 29, 1998
by
Barry Warsaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed interface for nearest() method to take individual red, green,
blue values instead of tuple
parent
e7a3131d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
Tools/pynche/ColorDB.py
Tools/pynche/ColorDB.py
+1
-2
No files found.
Tools/pynche/ColorDB.py
View file @
f9b1200f
...
...
@@ -85,11 +85,10 @@ class ColorDB:
except
KeyError
:
raise
BadColor
(
name
)
def
nearest
(
self
,
r
gbtupl
e
):
def
nearest
(
self
,
r
ed
,
green
,
blu
e
):
# TBD: use Voronoi diagrams, Delaunay triangulation, or octree for
# speeding up the locating of nearest point. Exhaustive search is
# inefficient, but may be fast enough.
red
,
green
,
blue
=
rgbtuple
nearest
=
-
1
nearest_name
=
''
for
name
,
aliases
in
self
.
__byrgb
.
values
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment