/usr/lib64/python2.6/site-packages/pynche
NameSizeModeActions
X/-0755rm
ChipViewer.py49980644editdlrm
ChipViewer.pyc55050644editdlrm
ChipViewer.pyo55050644editdlrm
ColorDB.py89410644editdlrm
ColorDB.pyc97510644editdlrm
ColorDB.pyo97510644editdlrm
DetailsViewer.py101150644editdlrm
DetailsViewer.pyc106410644editdlrm
DetailsViewer.pyo106410644editdlrm
html40colors.txt2450644editdlrm
ListViewer.py66480644editdlrm
ListViewer.pyc72220644editdlrm
ListViewer.pyo72220644editdlrm
Main.py64000644editdlrm
Main.pyc63410644editdlrm
Main.pyo63410644editdlrm
namedcolors.txt57160644editdlrm
pyColorChooser.py37680644editdlrm
pyColorChooser.pyc44530644editdlrm
pyColorChooser.pyo44530644editdlrm
pynche1790755editdlrm
PyncheWidget.py105010644editdlrm
PyncheWidget.pyc111460644editdlrm
PyncheWidget.pyo111460644editdlrm
README157840644editdlrm
StripViewer.py154650644editdlrm
StripViewer.pyc139040644editdlrm
StripViewer.pyo137480644editdlrm
Switchboard.py48170644editdlrm
Switchboard.pyc60910644editdlrm
Switchboard.pyo60910644editdlrm
TextViewer.py68690644editdlrm
TextViewer.pyc74100644editdlrm
TextViewer.pyo74100644editdlrm
TypeinViewer.py61020644editdlrm
TypeinViewer.pyc64700644editdlrm
TypeinViewer.pyo64700644editdlrm
webcolors.txt30880644editdlrm
websafe.txt17490644editdlrm
__init__.py470644editdlrm
__init__.pyc1400644editdlrm
__init__.pyo1400644editdlrm
Edit: /usr/lib64/python2.6/site-packages/pynche/ColorDB.pyc (9751B)
Ñò «gc@s dZddkZddkZddkTddkZdefd„ƒYZdadZ dZ dd3d „ƒYZ d e fd „ƒYZ d e fd „ƒYZ de fd„ƒYZde fd„ƒYZeidƒe feidƒe feidƒe feidƒefeidƒefgZdd„ZhZd„Zhad„Zd5Zd„Zd„Zedjo’edƒZepd GHeid!ƒnd"Zeieƒ\ZZ Z!Z"eGd#GeGe Ge!Gee"ƒGHei#e"ƒ\Z$Z%d$Ge$Gd%Ge i&e%ƒGHd6\Z'Z(Z)d7\Z'Z(Z)d8\Z'Z(Z)d-GeGd.GHddk*Z*e*i*ƒZ+ei,e'e(e)ƒZ,e*i*ƒZ-d/Ge,Gd0Ge-e+Gd1GHxjei.ƒD]XZ/eie/ƒ\Z'Z(Z)ei0e'e(e)ƒZ%d2e/e'e(e)e i&e%d!ƒfGHq¨WndS(9sGColor Database. This file contains one class, called ColorDB, and several utility functions. The class must be instantiated by the get_colordb() function in this file, passing it a filename to read a database out of. The get_colordb() function will try to examine the file to figure out what the format of the file is. If it can't figure out the file format, or it has trouble reading the file, None is returned. You can pass get_colordb() an optional filetype argument. Supporte file types are: X_RGB_TXT -- X Consortium rgb.txt format files. Three columns of numbers from 0 .. 255 separated by whitespace. Arbitrary trailing columns used as the color name. The utility functions are useful for converting between the various expected color formats, and for calculating other color values. iÿÿÿÿN(t*tBadColorcBseZRS((t__name__t __module__(((s4/usr/lib64/python2.6/site-packages/pynche/ColorDB.pyRst s, tColorDBcBsYeZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z RS( c CsFd}|i|_h|_h|_d|_x|D] }|ii|ƒ}|p3ti dI|iIdI|IJ|d7}q4n|i |ƒ\}}}|i |ƒ}|i ƒ} |||f} |ii | |gfƒ\} } | |jo| | jo| i|ƒn| | f|i| <| |i| <|d}q4WdS(NisError ins linei(tnamet_ColorDB__namet_ColorDB__byrgbt_ColorDB__bynametNonet_ColorDB__allnamest_retmatchtsyststderrt _extractrgbt _extractnametlowertgettappend( tselftfptlinenotlinetmotredtgreentblueRtkeynametkeyt foundnametaliases((s4/usr/lib64/python2.6/site-packages/pynche/ColorDB.pyt__init__'s,    "  ! cCs4g}|idddƒD]}|t|ƒq~S(NRRR(tgrouptint(RRt_[1]tx((s4/usr/lib64/python2.6/site-packages/pynche/ColorDB.pyRMscCs |idƒS(NR(R"(RR((s4/usr/lib64/python2.6/site-packages/pynche/ColorDB.pyRPscCs|iS(N(R(R((s4/usr/lib64/python2.6/site-packages/pynche/ColorDB.pytfilenameSscCs5y|i|SWntj ot|ƒ‚nXdS(sReturn name for rgbtupleN(RtKeyErrorR(Rtrgbtuple((s4/usr/lib64/python2.6/site-packages/pynche/ColorDB.pyt find_byrgbVscCsA|iƒ}y|i|SWntj ot|ƒ‚nXdS(s"Return (red, green, blue) for nameN(RR R'R(RR((s4/usr/lib64/python2.6/site-packages/pynche/ColorDB.pyt find_byname]s  cCs®d}d}x›|iiƒD]Š\}}|i|iƒ\}} } ||} || } || } | | | | | | }|djp ||jo|}|}qqW|S(s3Return the name of color nearest (red, green, blue)iÿÿÿÿt(RtvaluesR R(RRRRtnearestt nearest_nameRR trtgtbtrdeltatgdeltatbdeltatdistance((s4/usr/lib64/python2.6/site-packages/pynche/ColorDB.pyR-es    cCsg|ipVg|_x-|iiƒD]\}}|ii|ƒq#Wd„}|ii|ƒn|iS(NcSst|iƒ|iƒƒS(N(tcmpR(tn1tn2((s4/usr/lib64/python2.6/site-packages/pynche/ColorDB.pyt nocase_cmp~s(R RR,Rtsort(RRR R9((s4/usr/lib64/python2.6/site-packages/pynche/ColorDB.pyt unique_namesws    cCsVy |i|||f\}}Wn(tj ot|||fƒ‚nX|g|S(N(RR'R(RRRRRR ((s4/usr/lib64/python2.6/site-packages/pynche/ColorDB.pyt aliases_ofƒs  ( RRR!RRR&R)R*R-R;R<(((s4/usr/lib64/python2.6/site-packages/pynche/ColorDB.pyR&s &       t RGBColorDBcBseZeidƒZRS(s?\s*(?P\d+)\s+(?P\d+)\s+(?P\d+)\s+(?P.*)(RRtretcompileR (((s4/usr/lib64/python2.6/site-packages/pynche/ColorDB.pyR=‹stHTML40DBcBs eZeidƒZd„ZRS(s+(?P\S+)\s+(?P#[0-9a-fA-F]{6})cCst|idƒƒS(Nthexrgb(trrggbb_to_tripletR"(RR((s4/usr/lib64/python2.6/site-packages/pynche/ColorDB.pyR“s(RRR>R?R R(((s4/usr/lib64/python2.6/site-packages/pynche/ColorDB.pyR@st LightlinkDBcBs eZeidƒZd„ZRS(s,(?P(.+))\s+(?P#[0-9a-fA-F]{6})cCs|idƒiƒS(NR(R"tstrip(RR((s4/usr/lib64/python2.6/site-packages/pynche/ColorDB.pyR™s(RRR>R?R R(((s4/usr/lib64/python2.6/site-packages/pynche/ColorDB.pyRC–st WebsafeDBcBs)eZeidƒZd„Zd„ZRS(s(?P#[0-9a-fA-F]{6})cCst|idƒƒS(NRA(RBR"(RR((s4/usr/lib64/python2.6/site-packages/pynche/ColorDB.pyRŸscCs|idƒiƒS(NRA(R"tupper(RR((s4/usr/lib64/python2.6/site-packages/pynche/ColorDB.pyR¢s(RRR>R?R RR(((s4/usr/lib64/python2.6/site-packages/pynche/ColorDB.pyREœs tXorgt XConsortiumtHTMLt lightlinktWebsafec Cs¨d}t|ƒ}z~|iƒ}|pdS|djo t}n |g}x3|D]'\}}|i|ƒ}|oPqTqTWdS||ƒ}Wd|iƒX|a|S(N(R topentreadlinet FILETYPEStsearchtcloset DEFAULT_DB( tfiletfiletypetcolordbRRt filetypesttyperetclass_R((s4/usr/lib64/python2.6/site-packages/pynche/ColorDB.pyt get_colordb³s&        cCs ti|ƒ}|djo€|ddjot|ƒ‚n|dd!}|dd!}|dd!}t|dƒt|dƒt|dƒf}|t|ttypesR`t ExceptionRR RQtSPACEt COMMASPACERR=R@RCRER?RNRXRZRBR\R^RbRcRdRRTtexitttargetR*RRRR(R)RR tjoinR/R0R1ttimett0R-tt1R;tnR<(((s4/usr/lib64/python2.6/site-packages/pynche/ColorDB.pytsf    e