/usr/lib64/python2.7/site-packages/pynche
NameSizeModeActions
X/-0755rm
ChipViewer.py49980644editdlrm
ChipViewer.pyc54990644editdlrm
ChipViewer.pyo54990644editdlrm
ColorDB.py89410644editdlrm
ColorDB.pyc96920644editdlrm
ColorDB.pyo96920644editdlrm
DetailsViewer.py101160644editdlrm
DetailsViewer.pyc105710644editdlrm
DetailsViewer.pyo105710644editdlrm
html40colors.txt2450644editdlrm
ListViewer.py66480644editdlrm
ListViewer.pyc71940644editdlrm
ListViewer.pyo71940644editdlrm
Main.py64000644editdlrm
Main.pyc62840644editdlrm
Main.pyo62840644editdlrm
namedcolors.txt57160644editdlrm
pyColorChooser.py37680644editdlrm
pyColorChooser.pyc44240644editdlrm
pyColorChooser.pyo44240644editdlrm
pynche1820755editdlrm
PyncheWidget.py105010644editdlrm
PyncheWidget.pyc111000644editdlrm
PyncheWidget.pyo111000644editdlrm
README157840644editdlrm
StripViewer.py154650644editdlrm
StripViewer.pyc138630644editdlrm
StripViewer.pyo137170644editdlrm
Switchboard.py48170644editdlrm
Switchboard.pyc60650644editdlrm
Switchboard.pyo60650644editdlrm
TextViewer.py68690644editdlrm
TextViewer.pyc73590644editdlrm
TextViewer.pyo73590644editdlrm
TypeinViewer.py61020644editdlrm
TypeinViewer.pyc64110644editdlrm
TypeinViewer.pyo64110644editdlrm
webcolors.txt30880644editdlrm
websafe.txt17490644editdlrm
__init__.py470644editdlrm
__init__.pyc1400644editdlrm
__init__.pyo1400644editdlrm
Edit: /usr/lib64/python2.7/site-packages/pynche/ColorDB.pyc (9692B)
ó ¿œ^c @sdZddlZddlZddlTddlZdefd„ƒYZdadZ dZ dd3d „ƒYZ d e fd „ƒYZ d e fd „ƒYZ de fd„ƒYZde fd„ƒYZejdƒe fejdƒe fejdƒe fejdƒefejdƒefgZdd„ZiZd„Ziad„Zd5Zd„Zd„ZedkredƒZesœd GHejd!ƒnd"Zejeƒ\ZZ Z!Z"eGd#GeGe Ge!Gee"ƒGHej#e"ƒ\Z$Z%d$Ge$Gd%Ge j&e%ƒGHd6\Z'Z(Z)d7\Z'Z(Z)d8\Z'Z(Z)d-GeGd.GHddl*Z*e*j*ƒZ+ej,e'e(e)ƒZ,e*j*ƒZ-d/Ge,Gd0Ge-e+Gd1GHxiej.ƒD]XZ/eje/ƒ\Z'Z(Z)ej0e'e(e)ƒZ%d2e/e'e(e)e j&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.7/site-packages/pynche/ColorDB.pyRst s, tColorDBcBsYeZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z RS( c CsAd}|j|_i|_i|_d|_x |D]}|jj|ƒ}|s„tj dI|jIdI|IJ|d7}q4n|j |ƒ\}}}|j |ƒ}|j ƒ} |||f} |jj | |gfƒ\} } | |kr| | kr| j|ƒn| | f|j| <| |j| <|d}q4WdS(NisError ins linei(tnamet_ColorDB__namet_ColorDB__byrgbt_ColorDB__bynametNonet_ColorDB__allnamest_retmatchtsyststderrt _extractrgbt _extractnametlowertgettappend( tselftfptlinenotlinetmotredtgreentblueRtkeynametkeyt foundnametaliases((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pyt__init__'s*     "  ! cCs,g|jdddƒD]}t|ƒ^qS(NRRR(tgrouptint(RRtx((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pyRMscCs |jdƒS(NR(R"(RR((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pyRPscCs|jS(N(R(R((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pytfilenameSscCs3y|j|SWntk r.t|ƒ‚nXdS(sReturn name for rgbtupleN(RtKeyErrorR(Rtrgbtuple((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pyt find_byrgbVs cCs?|jƒ}y|j|SWntk r:t|ƒ‚nXdS(s"Return (red, green, blue) for nameN(RR R&R(RR((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pyt find_byname]s   cCs«d}d}x˜|jjƒD]‡\}}|j|jƒ\}} } ||} || } || } | | | | | | }|dks”||kr|}|}qqW|S(s3Return the name of color nearest (red, green, blue)iÿÿÿÿt(RtvaluesR R(RRRRtnearestt nearest_nameRR trtgtbtrdeltatgdeltatbdeltatdistance((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pyR,es    cCse|js^g|_x-|jjƒD]\}}|jj|ƒq"Wd„}|jj|ƒn|jS(NcSst|jƒ|jƒƒS(N(tcmpR(tn1tn2((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pyt nocase_cmp~s(R RR+Rtsort(RRR R8((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pyt unique_namesws   cCsTy |j|||f\}}Wn&tk rHt|||fƒ‚nX|g|S(N(RR&R(RRRRRR ((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pyt aliases_ofƒs   ( RRR!RRR%R(R)R,R:R;(((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pyR&s &       t RGBColorDBcBseZejdƒZRS(s?\s*(?P\d+)\s+(?P\d+)\s+(?P\d+)\s+(?P.*)(RRtretcompileR (((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pyR<‹stHTML40DBcBs eZejdƒZd„ZRS(s+(?P\S+)\s+(?P#[0-9a-fA-F]{6})cCst|jdƒƒS(Nthexrgb(trrggbb_to_tripletR"(RR((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pyR“s(RRR=R>R R(((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pyR?st LightlinkDBcBs eZejdƒZd„ZRS(s,(?P(.+))\s+(?P#[0-9a-fA-F]{6})cCs|jdƒjƒS(NR(R"tstrip(RR((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pyR™s(RRR=R>R R(((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pyRB–st WebsafeDBcBs)eZejdƒZd„Zd„ZRS(s(?P#[0-9a-fA-F]{6})cCst|jdƒƒS(NR@(RAR"(RR((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pyRŸscCs|jdƒjƒS(NR@(R"tupper(RR((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pyR¢s(RRR=R>R RR(((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pyRDœs tXorgt XConsortiumtHTMLt lightlinktWebsafec Cs¢d}t|ƒ}zx|jƒ}|s+dS|dkr@t}n |g}x1|D]%\}}|j|ƒ}|rPPqPqPWdS||ƒ}Wd|jƒX|a|S(N(R topentreadlinet FILETYPEStsearchtcloset DEFAULT_DB( tfiletfiletypetcolordbRRt filetypesttyperetclass_R((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pyt get_colordb³s$      cCsœtj|ƒ}|dkr˜|ddkr:t|ƒ‚n|dd!}|dd!}|dd!}t|dƒt|dƒt|dƒf}|t|RMRWRYRAR[R]RaRbRcRRStexitttargetR)RRRR'R(RR tjoinR.R/R0ttimett0R,tt1R:tnR;(((s4/usr/lib64/python2.7/site-packages/pynche/ColorDB.pytsd    e